1
0
Fork 0
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:
Cooper 2024-09-23 00:19:13 +00:00 committed by GitHub
parent b7d854c678
commit c06e455453
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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";
}
}
}