Add vite as devDependency

This commit is contained in:
Nikita Karamov 2022-02-10 21:26:11 +01:00
parent 6816879bbc
commit 77123986bf
No known key found for this signature in database
GPG Key ID: 3C8E688C96EEB9C9
2 changed files with 20 additions and 1 deletions

View File

@ -60,7 +60,8 @@
"rollup": "^2.67.0",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-terser": "^7.0.2",
"size-limit": "^7.0.5"
"size-limit": "^7.0.5",
"vite": "^2.8.0"
},
"size-limit": [
{

18
vite.config.js Normal file
View File

@ -0,0 +1,18 @@
import { defineConfig } from "vite";
import * as path from "path";
export default defineConfig({
esbuild: {
minify: true,
},
build: {
sourcemap: true,
target: "esnext",
minify: "terser",
lib: {
entry: path.resolve("./src/index.js"),
name: "Shareon",
formats: ["es", "umd", "iife"],
},
},
});