初始化项目
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// @ts-ignore
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import { resolve } from 'path';
|
||||
import { defineConfig, loadEnv, ConfigEnv } from 'vite';
|
||||
@@ -45,6 +46,7 @@ const viteConfig = defineConfig((mode: ConfigEnv) => {
|
||||
assetFileNames: 'assets/[ext]/[name]-[hash].[ext]',
|
||||
manualChunks(id) {
|
||||
if (id.includes('node_modules')) {
|
||||
// @ts-ignore
|
||||
return id.toString().match(/\/node_modules\/(?!.pnpm)(?<moduleName>[^\/]*)\//)?.groups!.moduleName ?? 'vender';
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user