build(web): split framework deps into cache-stable vendor chunks (#67)
This commit is contained in:
@@ -16,6 +16,26 @@ export default defineConfig({
|
||||
"@": path.resolve(__dirname, "./src")
|
||||
}
|
||||
},
|
||||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks(id) {
|
||||
if (/[\\/]node_modules[\\/]\.pnpm[\\/](react|react-dom|react-router|react-router-dom)@/.test(id)) {
|
||||
return "react";
|
||||
}
|
||||
if (/[\\/]node_modules[\\/]\.pnpm[\\/]@base-ui\+react@/.test(id)) {
|
||||
return "base-ui";
|
||||
}
|
||||
if (/[\\/]node_modules[\\/]\.pnpm[\\/]@tanstack\+react-query@/.test(id)) {
|
||||
return "query";
|
||||
}
|
||||
if (/[\\/]node_modules[\\/]\.pnpm[\\/](i18next|react-i18next)@/.test(id)) {
|
||||
return "i18n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
"/api": "http://localhost:8080",
|
||||
|
||||
Reference in New Issue
Block a user