-
-
Notifications
You must be signed in to change notification settings - Fork 307
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b6b7e8c
commit 6ab5735
Showing
3 changed files
with
30 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,35 @@ | ||
import {defineConfig} from 'vite'; | ||
import {join} from 'path'; | ||
import { defineConfig } from 'vite'; | ||
import { join } from 'path'; | ||
import vue from '@vitejs/plugin-vue'; | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [vue()], | ||
server:{ | ||
port: 3002 | ||
}, | ||
build: { | ||
rollupOptions: { | ||
output: { | ||
manualChunks(id) { | ||
if (id.includes('node_modules')) { | ||
return id.toString().split('node_modules/')[1].split('/')[0].toString(); | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
resolve: { | ||
alias: { | ||
'@': join(__dirname, 'src'), | ||
optimizeDeps: { | ||
// vite pre-bundle dependency enter file | ||
entries: ['src/**/*'], | ||
}, | ||
plugins: [vue()], | ||
server: { | ||
port: 3002, | ||
}, | ||
build: { | ||
rollupOptions: { | ||
output: { | ||
manualChunks(id) { | ||
if (id.includes('node_modules')) { | ||
return id | ||
.toString() | ||
.split('node_modules/')[1] | ||
.split('/')[0] | ||
.toString(); | ||
} | ||
}, | ||
}, | ||
}, | ||
}, | ||
resolve: { | ||
alias: { | ||
'@': join(__dirname, 'src'), | ||
}, | ||
}, | ||
}); |