Update to Vite v4

Nikita Karamov 2023-01-25 18:19:33 +01:00
parent adf5d62b7c
commit e28a7c6f67
No known key found for this signature in database
GPG Key ID: 41D6F71EE78E77CD
2 changed files with 3 additions and 1 deletions

View File

@ -68,7 +68,7 @@
"postcss-csso": "^6.0.1", "postcss-csso": "^6.0.1",
"prettier": "^2.7.1", "prettier": "^2.7.1",
"size-limit": "^8.1.0", "size-limit": "^8.1.0",
"vite": "^2.8.0" "vite": "^4.0.4"
}, },
"browserslist": "> 0.3%, last 2 versions, Firefox ESR, not dead", "browserslist": "> 0.3%, last 2 versions, Firefox ESR, not dead",
"size-limit": [ "size-limit": [

View File

@ -10,6 +10,8 @@ export default defineConfig({
entry: path.resolve("./src/index.js"), entry: path.resolve("./src/index.js"),
name: "Shareon", name: "Shareon",
formats: ["es", "umd", "iife"], formats: ["es", "umd", "iife"],
// Workaround to keep the old file names
fileName: (format, _) => `shareon.${format}.js`,
}, },
rollupOptions: { rollupOptions: {
output: { output: {