Update Vite.js to 2.9.9 and add Rollup Plugin Visualizer

This commit is contained in:
Louis Lam 2022-06-01 16:39:43 +08:00
parent c6c1bb5b5c
commit c5018d0996
3 changed files with 847 additions and 263 deletions

View File

@ -1,6 +1,7 @@
import legacy from "@vitejs/plugin-legacy"; import legacy from "@vitejs/plugin-legacy";
import vue from "@vitejs/plugin-vue"; import vue from "@vitejs/plugin-vue";
import { defineConfig } from "vite"; import { defineConfig } from "vite";
import visualizer from "rollup-plugin-visualizer";
const postCssScss = require("postcss-scss"); const postCssScss = require("postcss-scss");
const postcssRTLCSS = require("postcss-rtlcss"); const postcssRTLCSS = require("postcss-rtlcss");
@ -12,7 +13,10 @@ export default defineConfig({
legacy({ legacy({
targets: [ "ie > 11" ], targets: [ "ie > 11" ],
additionalLegacyPolyfills: [ "regenerator-runtime/runtime" ] additionalLegacyPolyfills: [ "regenerator-runtime/runtime" ]
}) }),
visualizer({
filename: "tmp/dist-stats.html"
}),
], ],
css: { css: {
postcss: { postcss: {

1095
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -130,9 +130,9 @@
"@babel/eslint-parser": "~7.17.0", "@babel/eslint-parser": "~7.17.0",
"@babel/preset-env": "^7.15.8", "@babel/preset-env": "^7.15.8",
"@types/bootstrap": "~5.1.9", "@types/bootstrap": "~5.1.9",
"@vitejs/plugin-legacy": "~1.6.4", "@vitejs/plugin-legacy": "~1.8.2",
"@vitejs/plugin-vue": "~1.9.4", "@vitejs/plugin-vue": "~2.3.3",
"@vue/compiler-sfc": "~3.2.31", "@vue/compiler-sfc": "~3.2.36",
"aedes": "^0.46.3", "aedes": "^0.46.3",
"babel-plugin-rewire": "~1.2.0", "babel-plugin-rewire": "~1.2.0",
"concurrently": "^7.1.0", "concurrently": "^7.1.0",
@ -146,11 +146,12 @@
"npm-check-updates": "^12.5.9", "npm-check-updates": "^12.5.9",
"postcss-html": "^1.3.1", "postcss-html": "^1.3.1",
"puppeteer": "~13.1.3", "puppeteer": "~13.1.3",
"rollup-plugin-visualizer": "^5.6.0",
"sass": "~1.42.1", "sass": "~1.42.1",
"stylelint": "~14.7.1", "stylelint": "~14.7.1",
"stylelint-config-standard": "~25.0.0", "stylelint-config-standard": "~25.0.0",
"typescript": "~4.4.4", "typescript": "~4.4.4",
"vite": "~2.6.14", "vite": "~2.9.9",
"wait-on": "^6.0.1" "wait-on": "^6.0.1"
} }
} }