adminforth 3.31.13 → 3.31.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/spa/vite.config.ts +19 -0
- package/package.json +1 -1
package/dist/spa/vite.config.ts
CHANGED
|
@@ -38,6 +38,25 @@ export default defineConfig({
|
|
|
38
38
|
'@@': fileURLToPath(new URL('./src/custom', import.meta.url)),
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
|
+
build: {
|
|
42
|
+
rollupOptions: {
|
|
43
|
+
output: {
|
|
44
|
+
manualChunks(id) {
|
|
45
|
+
// dayjs locales are imported on demand, keep them out of the eagerly loaded dayjs chunk
|
|
46
|
+
if (id.includes('dayjs/locale/')) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
// reduce the size of the vendor chunk
|
|
50
|
+
// to only include the package name
|
|
51
|
+
// helps to reduce consumption of memory
|
|
52
|
+
if (id.includes('node_modules/')) {
|
|
53
|
+
// take the last node_modules segment: pnpm nests packages as node_modules/.pnpm/<pkg>@<version>/node_modules/<pkg>
|
|
54
|
+
return id.split('node_modules/').pop()!.split('/')[0];
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
41
60
|
css: {
|
|
42
61
|
preprocessorOptions: {
|
|
43
62
|
scss: {
|