From e28a7c6f6707f136f9b7ce29e54cbfe59698d1e7 Mon Sep 17 00:00:00 2001 From: Nikita Karamov Date: Wed, 25 Jan 2023 18:19:33 +0100 Subject: [PATCH] Update to Vite v4 --- package.json | 2 +- vite.config.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 1be8158..1649f66 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "postcss-csso": "^6.0.1", "prettier": "^2.7.1", "size-limit": "^8.1.0", - "vite": "^2.8.0" + "vite": "^4.0.4" }, "browserslist": "> 0.3%, last 2 versions, Firefox ESR, not dead", "size-limit": [ diff --git a/vite.config.js b/vite.config.js index f41bbcd..3fe4dea 100644 --- a/vite.config.js +++ b/vite.config.js @@ -10,6 +10,8 @@ export default defineConfig({ entry: path.resolve("./src/index.js"), name: "Shareon", formats: ["es", "umd", "iife"], + // Workaround to keep the old file names + fileName: (format, _) => `shareon.${format}.js`, }, rollupOptions: { output: {