mirror of
https://github.com/usememos/memos.git
synced 2025-03-04 09:19:09 +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: {
|
build: {
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
output: {
|
output: {
|
||||||
entryFileNames: "app.[hash].js",
|
entryFileNames: "assets/app.[hash].js",
|
||||||
chunkFileNames: (chunkInfo) => {
|
chunkFileNames: "assets/[name].[hash].js",
|
||||||
const facadeModuleId = chunkInfo.facadeModuleId ? chunkInfo.facadeModuleId.split("/") : [];
|
|
||||||
const name = facadeModuleId[facadeModuleId.length - 2] || "[name]";
|
|
||||||
return `assets/${name}/[name].[hash].js`;
|
|
||||||
},
|
|
||||||
assetFileNames: "assets/[name].[hash][extname]",
|
assetFileNames: "assets/[name].[hash][extname]",
|
||||||
manualChunks: {
|
manualChunks: {
|
||||||
"react-vendor": ["react", "react-dom", "react-router-dom"],
|
"react-vendor": ["react", "react-dom", "react-router-dom"],
|
||||||
|
@ -57,7 +53,7 @@ export default defineConfig({
|
||||||
"katex-vendor": ["katex"],
|
"katex-vendor": ["katex"],
|
||||||
"highlight-vendor": ["highlight.js"],
|
"highlight-vendor": ["highlight.js"],
|
||||||
"mermaid-vendor": ["mermaid"],
|
"mermaid-vendor": ["mermaid"],
|
||||||
"map-vendor": ["leaflet", "react-leaflet"],
|
"leaflet-vendor": ["leaflet", "react-leaflet"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue