Skip to content

Commit

Permalink
fix: 修复每次修改所有文件皆被修改的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ZvonimirSun committed Oct 30, 2023
1 parent a007c3f commit 687363c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/auto-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ declare global {
const EffectScope: typeof import('vue')['EffectScope']
const ElMessage: typeof import('element-plus/es')['ElMessage']
const ElMessageBox: typeof import('element-plus/es')['ElMessageBox']
const ElTag: typeof import('element-plus/es')['ElTag']
const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
const autoResetRef: typeof import('@vueuse/core')['autoResetRef']
Expand Down
15 changes: 15 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,21 @@ export default defineConfig({
optimizeDeps: {
include: ['vue', 'element-plus', 'ant-design-vue']
},
build: {
rollupOptions: {
output: {
entryFileNames: 'assets/[name].js',
// Workaround: Vite is bundling its plugins to the main index chunk,
// causing circular dependencies and cascading hash changes.
manualChunks (id) {
if (id.startsWith('vite/') || id.startsWith('\0vite/')) {
// Put the Vite modules and virtual modules (beginning with \0) into a vite chunk.
return 'vite'
}
}
}
}
},
resolve: {
alias: {
'@': resolve('src')
Expand Down

0 comments on commit 687363c

Please sign in to comment.