diff --git a/package.json b/package.json index 43c864f..4dc4fef 100644 --- a/package.json +++ b/package.json @@ -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": [ { diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..b2ea4e6 --- /dev/null +++ b/vite.config.js @@ -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"], + }, + }, +});