From a8d7d415e4638fd9472b801234ac780678997486 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期一, 10 十一月 2025 14:04:16 +0800
Subject: [PATCH] fix: bug

---
 apps/cMiniApp/config/index.js |   46 ++++++++++++++++++++++++----------------------
 1 files changed, 24 insertions(+), 22 deletions(-)

diff --git a/apps/cMiniApp/config/index.js b/apps/cMiniApp/config/index.js
index 17b77cd..14ef20c 100644
--- a/apps/cMiniApp/config/index.js
+++ b/apps/cMiniApp/config/index.js
@@ -1,7 +1,7 @@
 const path = require('path');
-const AutoImport = require('unplugin-auto-import/webpack');
 const { CIPluginFn } = require('../ci/upload');
 
+import AutoImport from 'unplugin-auto-import/webpack';
 import ComponentsPlugin from 'unplugin-vue-components/webpack';
 import NutUIResolver from '@nutui/nutui-taro/dist/resolver';
 
@@ -25,12 +25,6 @@
   alias: {
     '@': path.resolve(__dirname, '..', 'src'),
     '@components/assets': path.resolve(__dirname, '..', 'node_modules', '@12333/components/assets'),
-    '@tencentcloud/chat-uikit-engine': path.resolve(
-      __dirname,
-      '..',
-      'node_modules',
-      '@tencentcloud/chat-uikit-engine'
-    ),
   },
   sourceRoot: 'src',
   outputRoot: 'dist',
@@ -117,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`
@@ -134,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