From 8528852ee8533fbd9c31a6d10364f1806ad09e1e Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期六, 08 十一月 2025 15:39:59 +0800
Subject: [PATCH] fix: bug
---
apps/cMiniApp/config/index.js | 38 +++++++++++++++++++++++---------------
1 files changed, 23 insertions(+), 15 deletions(-)
diff --git a/apps/cMiniApp/config/index.js b/apps/cMiniApp/config/index.js
index bb4c8db..14ef20c 100644
--- a/apps/cMiniApp/config/index.js
+++ b/apps/cMiniApp/config/index.js
@@ -111,7 +111,13 @@
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 +134,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