From 77123986bfef948b69d1865beb865e99619729ab Mon Sep 17 00:00:00 2001 From: Nikita Karamov Date: Thu, 10 Feb 2022 21:26:11 +0100 Subject: [PATCH] Add vite as devDependency --- package.json | 3 ++- vite.config.js | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 vite.config.js 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"], + }, + }, +});