mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-20 14:37:43 +01:00
attempt to fix manual chunk loading
This commit is contained in:
parent
b7d854c678
commit
c06e455453
1 changed files with 23 additions and 24 deletions
|
@ -124,30 +124,29 @@ export default defineConfig(({ mode }) => {
|
|||
sourcemap: true,
|
||||
chunkSizeWarningLimit: 1600,
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks(id: string) {
|
||||
if (id.includes("@sozialhelden+ietf-language-tags") || id.includes("country-language")) {
|
||||
return "language-db";
|
||||
}
|
||||
if (id.includes("hls.js")) {
|
||||
return "hls";
|
||||
}
|
||||
if (id.includes("node-forge") || id.includes("crypto-js")) {
|
||||
return "auth";
|
||||
}
|
||||
if (id.includes("locales") && !id.includes("en.json")) {
|
||||
return "locales";
|
||||
}
|
||||
if (id.includes("react-dom")) {
|
||||
return "react-dom";
|
||||
}
|
||||
if (id.includes("Icon.tsx")) {
|
||||
return "Icons";
|
||||
}
|
||||
const isCaptioningPackage = captioningPackages.some(packageName => id.includes(packageName));
|
||||
if (isCaptioningPackage) {
|
||||
return "caption-parsing";
|
||||
}
|
||||
output: {},
|
||||
manualChunks(id: string) {
|
||||
if (id.includes("@sozialhelden+ietf-language-tags") || id.includes("country-language")) {
|
||||
return "language-db";
|
||||
}
|
||||
if (id.includes("hls.js")) {
|
||||
return "hls";
|
||||
}
|
||||
if (id.includes("node-forge") || id.includes("crypto-js")) {
|
||||
return "auth";
|
||||
}
|
||||
if (id.includes("locales") && !id.includes("en.json")) {
|
||||
return "locales";
|
||||
}
|
||||
if (id.includes("react-dom")) {
|
||||
return "react-dom";
|
||||
}
|
||||
if (id.includes("Icon.tsx")) {
|
||||
return "Icons";
|
||||
}
|
||||
const isCaptioningPackage = captioningPackages.some(packageName => id.includes(packageName));
|
||||
if (isCaptioningPackage) {
|
||||
return "caption-parsing";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue