mirror of
https://github.com/gedoor/legado.git
synced 2025-01-08 11:47:32 +08:00
chore(modules/web/vite.config.js): remove console statement and replace depreted splitVendorChunkPlugin
This commit is contained in:
parent
8c268e4f59
commit
2b835c0ba4
@ -1,5 +1,5 @@
|
||||
import { fileURLToPath, URL } from "node:url";
|
||||
import { defineConfig, splitVendorChunkPlugin } from "vite";
|
||||
import { defineConfig } from "vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import Icons from "unplugin-icons/vite";
|
||||
import IconsResolver from "unplugin-icons/resolver";
|
||||
@ -12,7 +12,6 @@ export default ({ mode }) =>
|
||||
defineConfig({
|
||||
plugins: [
|
||||
vue(),
|
||||
splitVendorChunkPlugin(), // index vendor打包
|
||||
AutoImport({
|
||||
imports: ["vue", "vue-router", "pinia"],
|
||||
include: [/\.[tj]sx?$/, /\.vue$/, /\.vue\?vue/, /\.md$/],
|
||||
@ -52,4 +51,18 @@ export default ({ mode }) =>
|
||||
"@utils": fileURLToPath(new URL("./src/utils/", import.meta.url)),
|
||||
},
|
||||
},
|
||||
esbuild: {
|
||||
drop: ["console"],
|
||||
},
|
||||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: (id) => {
|
||||
if (id.includes("node_modules")) {
|
||||
return "vendor";
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user