更改配置文件,npm->pnpm

This commit is contained in:
qumeng039@126.com 2025-08-28 13:22:18 +08:00
parent f1bb8df4da
commit bcc8b7341a
5 changed files with 15 additions and 4907 deletions

BIN
dist.zip

Binary file not shown.

4868
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,7 @@
"dayjs": "^1.11.13", "dayjs": "^1.11.13",
"echarts": "^5.6.0", "echarts": "^5.6.0",
"element-plus": "^2.10.1", "element-plus": "^2.10.1",
"loadsh": "^0.0.4", "lodash": "^4.17.21",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"pinia": "^3.0.3", "pinia": "^3.0.3",
"pinia-plugin-persistedstate": "^4.3.0", "pinia-plugin-persistedstate": "^4.3.0",

View File

@ -23,9 +23,9 @@ importers:
element-plus: element-plus:
specifier: ^2.10.1 specifier: ^2.10.1
version: 2.11.1(vue@3.5.20) version: 2.11.1(vue@3.5.20)
loadsh: lodash:
specifier: ^0.0.4 specifier: ^4.17.21
version: 0.0.4 version: 4.17.21
lodash-es: lodash-es:
specifier: ^4.17.21 specifier: ^4.17.21
version: 4.17.21 version: 4.17.21
@ -966,10 +966,6 @@ packages:
resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==} resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==}
engines: {node: '>=14'} engines: {node: '>=14'}
loadsh@0.0.4:
resolution: {integrity: sha512-U+wLL8InpfRalWrr+0SuhWgGt10M4OyAk6G8xCYo2rwpiHtxZkWiFpjei0vO463ghW8LPCdhqQxXlMy2qicAEw==}
deprecated: This is a typosquat on the popular Lodash package. This is not maintained nor is the original Lodash package.
lodash-es@4.17.21: lodash-es@4.17.21:
resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==}
@ -2327,8 +2323,6 @@ snapshots:
lilconfig@3.1.3: {} lilconfig@3.1.3: {}
loadsh@0.0.4: {}
lodash-es@4.17.21: {} lodash-es@4.17.21: {}
lodash-unified@1.0.3(@types/lodash-es@4.17.12)(lodash-es@4.17.21)(lodash@4.17.21): lodash-unified@1.0.3(@types/lodash-es@4.17.12)(lodash-es@4.17.21)(lodash@4.17.21):

View File

@ -16,28 +16,6 @@ export default defineConfig(({ mode, command }) => {
return { return {
plugins: [ plugins: [
vue(), vue(),
imagemin({
plugins: [
{
name: "imagemin-mozjpeg",
options: {
quality: 85
}
},
{
name: "imagemin-pngquant",
options: {
quality: [0.8, 0.9]
}
},
{
name: "imagemin-svgo",
options: {
plugins: [{ name: "removeViewBox" }, { name: "cleanupIDs", active: false }]
}
}
]
}),
// 生产环境才移除console // 生产环境才移除console
isProduction && removeConsole(), isProduction && removeConsole(),
// 生产环境开启gzip 压缩 // 生产环境开启gzip 压缩
@ -57,9 +35,17 @@ export default defineConfig(({ mode, command }) => {
gzipSize: true gzipSize: true
}) })
].filter(Boolean), ].filter(Boolean),
// 确保所有资源类型都能被正确识别和处理
assetsInclude: ["**/*.csv"], assetsInclude: [
"**/*.csv",
"**/*.png",
"**/*.jpg",
"**/*.jpeg",
"**/*.gif",
"**/*.svg",
"**/*.webp"
],
base: "./",
css: { css: {
preprocessorOptions: { preprocessorOptions: {
scss: { scss: {
@ -69,7 +55,6 @@ export default defineConfig(({ mode, command }) => {
` `
} }
}, },
// 生产环境压缩 CSS // 生产环境压缩 CSS
...(isProduction && { ...(isProduction && {
postcss: { postcss: {
@ -81,7 +66,6 @@ export default defineConfig(({ mode, command }) => {
} }
}) })
}, },
resolve: { resolve: {
alias: { alias: {
"@": path.resolve(__dirname, "src"), "@": path.resolve(__dirname, "src"),
@ -107,7 +91,6 @@ export default defineConfig(({ mode, command }) => {
overlay: true overlay: true
} }
}, },
build: { build: {
target: "es2018", // JavaScript 代码,转换成兼容 ES2018 标准的代码 target: "es2018", // JavaScript 代码,转换成兼容 ES2018 标准的代码
chunkSizeWarningLimit: 1000, // 减少警告 chunkSizeWarningLimit: 1000, // 减少警告
@ -185,7 +168,6 @@ export default defineConfig(({ mode, command }) => {
} }
} }
}, },
// 预览服务器配置 // 预览服务器配置
preview: { preview: {
port: 4173, port: 4173,