CzRger 4 months ago
parent
commit
1d7975755b
1 changed files with 4 additions and 15 deletions
  1. 4 15
      snowy-admin-web/vite.config.mjs

+ 4 - 15
snowy-admin-web/vite.config.mjs

@@ -25,7 +25,6 @@ import convertLegacyToken from 'ant-design-vue/lib/theme/convertLegacyToken';
 const { defaultAlgorithm, defaultSeed } = theme;
 const { defaultAlgorithm, defaultSeed } = theme;
 const mapToken = defaultAlgorithm(defaultSeed);
 const mapToken = defaultAlgorithm(defaultSeed);
 const v3Token = convertLegacyToken.default(mapToken);
 const v3Token = convertLegacyToken.default(mapToken);
-const time = new Date().getTime()
 
 
 export const r = (...args) => resolve(__dirname, '.', ...args)
 export const r = (...args) => resolve(__dirname, '.', ...args)
 
 
@@ -64,20 +63,10 @@ export default defineConfig(({ command, mode }) => {
 			brotliSize: false,
 			brotliSize: false,
 			rollupOptions: {
 			rollupOptions: {
 				output: {
 				output: {
-					// manualChunks: {
-					// 	echarts: ['echarts'],
-					// 	'ant-design-vue': ['ant-design-vue'],
-					// 	vue: ['vue', 'vue-router', 'pinia', 'vue-i18n']
-					// }
-					manualChunks(id) {
-						if (id.includes('node_modules')) {
-							return time + id.toString().split('node_modules/')[1].split('/')[0].toString();
-						} else {
-							return time + id.toString();
-						}
-						// if(id.indexOf('node_modules') > -1) {
-						//   return 'vendor'
-						// }
+					manualChunks: {
+						echarts: ['echarts'],
+						'ant-design-vue': ['ant-design-vue'],
+						vue: ['vue', 'vue-router', 'pinia', 'vue-i18n']
 					}
 					}
 				}
 				}
 			},
 			},