From 6244c26cd11f6446b39c0ad50c8223b379e5258a Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期五, 07 十一月 2025 19:05:47 +0800
Subject: [PATCH] fix: bug
---
apps/bMiniApp/config/index.js | 42 ++++++++++++++++++++++++++----------------
1 files changed, 26 insertions(+), 16 deletions(-)
diff --git a/apps/bMiniApp/config/index.js b/apps/bMiniApp/config/index.js
index bb4c8db..1b6d59a 100644
--- a/apps/bMiniApp/config/index.js
+++ b/apps/bMiniApp/config/index.js
@@ -106,12 +106,20 @@
},
webpackChain(chain, webpack) {
if (process.env.NODE_ENV === 'development') {
- chain.plugin('analyzer').use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin, []);
+ chain
+ .plugin('analyzer')
+ .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin, [{ analyzerPort: 8889 }]);
}
chain.plugin('unplugin-auto-import').use(
AutoImport({
- imports: ['vue', 'pinia', 'vue-router', { '@/constants': ['RouterPath'] }],
+ dirs: ['./src/constants/**', './src/hooks/**'],
+ // dirsScanOptions: {
+ // fileFilter: (file) => file.endsWith('.ts'), // Filter files
+ // types: true,
+ // },
+ vueTemplate: true,
+ imports: ['vue', 'pinia', 'vue-router'],
eslintrc: {
enabled: true, // Default `false`
filepath: './.eslintrc-auto-import.json', // Default `./.eslintrc-auto-import.json`
@@ -128,22 +136,24 @@
})
);
- chain.merge({
- plugin: {
- install: {
- plugin: require('terser-webpack-plugin'),
- args: [
- {
- terserOptions: {
- compress: true, // 榛樿浣跨敤terser鍘嬬缉
- keep_classnames: true, // 涓嶆敼鍙榗lass鍚嶇О
- keep_fnames: true, // 涓嶆敼鍙樺嚱鏁板悕绉�
+ if (process.env.NODE_ENV !== 'development') {
+ chain.merge({
+ plugin: {
+ install: {
+ plugin: require('terser-webpack-plugin'),
+ args: [
+ {
+ terserOptions: {
+ compress: true, // 榛樿浣跨敤terser鍘嬬缉
+ keep_classnames: true, // 涓嶆敼鍙榗lass鍚嶇О
+ keep_fnames: true, // 涓嶆敼鍙樺嚱鏁板悕绉�
+ },
},
- },
- ],
+ ],
+ },
},
- },
- });
+ });
+ }
chain.merge({
optimization: {
--
Gitblit v1.9.1