|
|
|
@ -11,6 +11,15 @@ import { loadEnv, splitVendorChunkPlugin } from "vite";
@@ -11,6 +11,15 @@ import { loadEnv, splitVendorChunkPlugin } from "vite";
|
|
|
|
|
import tailwind from "tailwindcss"; |
|
|
|
|
import rtl from "postcss-rtlcss"; |
|
|
|
|
|
|
|
|
|
const captioningPackages = [ |
|
|
|
|
"dompurify", |
|
|
|
|
"htmlparser2", |
|
|
|
|
"subsrt-ts", |
|
|
|
|
"parse5", |
|
|
|
|
"entities", |
|
|
|
|
"fuse" |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
export default defineConfig(({ mode }) => { |
|
|
|
|
const env = loadEnv(mode, process.cwd()); |
|
|
|
|
return { |
|
|
|
@ -119,8 +128,18 @@ export default defineConfig(({ mode }) => {
@@ -119,8 +128,18 @@ export default defineConfig(({ mode }) => {
|
|
|
|
|
if (id.includes("hls.js")) { |
|
|
|
|
return "hls"; |
|
|
|
|
} |
|
|
|
|
if (id.includes("node-forge")) { |
|
|
|
|
return "node-forge"; |
|
|
|
|
if (id.includes("node-forge") || id.includes("crypto-js")) { |
|
|
|
|
return "auth"; |
|
|
|
|
} |
|
|
|
|
if (id.includes("locales") && !id.includes("en.json")) { |
|
|
|
|
return "locales"; |
|
|
|
|
} |
|
|
|
|
if (id.includes("Icon.tsx")) { |
|
|
|
|
return "Icons"; |
|
|
|
|
} |
|
|
|
|
const isCaptioningPackage = captioningPackages.some(packageName => id.includes(packageName)); |
|
|
|
|
if (isCaptioningPackage) { |
|
|
|
|
return "caption-parsing"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|