mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 06:02:38 +08:00
优化打包
This commit is contained in:
parent
e5d8337a81
commit
ba0525f559
@ -9,7 +9,7 @@
|
||||
"lint:eslint": "eslint \"./src/**/*.{vue,ts,tsx}\" --fix"
|
||||
},
|
||||
"dependencies": {
|
||||
"@cool-vue/crud": "^7.1.24",
|
||||
"@cool-vue/crud": "^7.1.26",
|
||||
"@element-plus/icons-vue": "^2.3.1",
|
||||
"@vueuse/core": "^10.4.0",
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -6,8 +6,8 @@ settings:
|
||||
|
||||
dependencies:
|
||||
'@cool-vue/crud':
|
||||
specifier: ^7.1.23
|
||||
version: 7.1.23(typescript@5.2.2)
|
||||
specifier: ^7.1.26
|
||||
version: 7.1.26(typescript@5.2.2)
|
||||
'@element-plus/icons-vue':
|
||||
specifier: ^2.3.1
|
||||
version: 2.3.1(vue@3.4.15)
|
||||
@ -482,8 +482,8 @@ packages:
|
||||
'@babel/helper-validator-identifier': 7.24.7
|
||||
to-fast-properties: 2.0.0
|
||||
|
||||
/@cool-vue/crud@7.1.23(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-0YmMorDU/3AOVH+hg01IcCt1y7CmSA35P9W3kmlJb2KXnAHnvWA72Bg7yrbl6M2l38ziUpU5eKnZTjd47/ZVZw==}
|
||||
/@cool-vue/crud@7.1.26(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-v8X32My5iGqt048FWkthMxVdOY5kTf2MVLIHyr8NoCEbSFN4vzDSbLE6TWgQMHd62GCDxlB9e/QQGCc55CZGcA==}
|
||||
dependencies:
|
||||
'@element-plus/icons-vue': 2.3.1(vue@3.4.15)
|
||||
array.prototype.flat: 1.3.2
|
||||
|
File diff suppressed because one or more lines are too long
@ -6,6 +6,7 @@ import compression from "vite-plugin-compression";
|
||||
import { visualizer } from "rollup-plugin-visualizer";
|
||||
import { proxy } from "./src/config/proxy";
|
||||
import { cool } from "@cool-vue/vite-plugin";
|
||||
import { constants } from "crypto";
|
||||
|
||||
function resolve(dir: string) {
|
||||
return path.resolve(__dirname, ".", dir);
|
||||
@ -58,6 +59,7 @@ export default ({ mode }: ConfigEnv): UserConfig => {
|
||||
esbuild: {
|
||||
drop: isDev(mode) ? [] : ["console", "debugger"]
|
||||
},
|
||||
|
||||
build: {
|
||||
minify: "esbuild",
|
||||
// terserOptions: {
|
||||
@ -75,13 +77,17 @@ export default ({ mode }: ConfigEnv): UserConfig => {
|
||||
manualChunks(id) {
|
||||
if (id.includes("node_modules")) {
|
||||
if (!["@cool-vue/crud"].find((e) => id.includes(e))) {
|
||||
let str = id.toString().split("node_modules/")[1];
|
||||
|
||||
if (str[0] == "@") {
|
||||
str = str.replace("/", ".");
|
||||
if (id.includes("prettier")) {
|
||||
return;
|
||||
}
|
||||
|
||||
return str.split("/")[0].toString();
|
||||
return id
|
||||
.toString()
|
||||
.split("node_modules/")[1]
|
||||
.replace(".pnpm/", "")
|
||||
.split("/")[0];
|
||||
} else {
|
||||
return "comm";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user