mirror of
https://github.com/usememos/memos.git
synced 2025-03-04 01:04:38 +08:00
chore: tweak vite config
This commit is contained in:
parent
5962c6d04b
commit
f60906ce33
1 changed files with 3 additions and 7 deletions
|
@ -43,12 +43,8 @@ export default defineConfig({
|
|||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
entryFileNames: "app.[hash].js",
|
||||
chunkFileNames: (chunkInfo) => {
|
||||
const facadeModuleId = chunkInfo.facadeModuleId ? chunkInfo.facadeModuleId.split("/") : [];
|
||||
const name = facadeModuleId[facadeModuleId.length - 2] || "[name]";
|
||||
return `assets/${name}/[name].[hash].js`;
|
||||
},
|
||||
entryFileNames: "assets/app.[hash].js",
|
||||
chunkFileNames: "assets/[name].[hash].js",
|
||||
assetFileNames: "assets/[name].[hash][extname]",
|
||||
manualChunks: {
|
||||
"react-vendor": ["react", "react-dom", "react-router-dom"],
|
||||
|
@ -57,7 +53,7 @@ export default defineConfig({
|
|||
"katex-vendor": ["katex"],
|
||||
"highlight-vendor": ["highlight.js"],
|
||||
"mermaid-vendor": ["mermaid"],
|
||||
"map-vendor": ["leaflet", "react-leaflet"],
|
||||
"leaflet-vendor": ["leaflet", "react-leaflet"],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue