mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-22 15:54:26 +00:00
30 lines
507 B
TypeScript
30 lines
507 B
TypeScript
// eslint-disable-next-line no-restricted-imports
|
|
import { dependencies } from "../package.json";
|
|
|
|
const vendors = [
|
|
"react",
|
|
"react-router-dom",
|
|
"react-dom",
|
|
"@tanstack/react-query",
|
|
"axios",
|
|
"socket.io-client",
|
|
];
|
|
|
|
function renderChunks() {
|
|
const chunks: Record<string, string[]> = {};
|
|
|
|
for (const key in dependencies) {
|
|
if (!vendors.includes(key)) {
|
|
chunks[key] = [key];
|
|
}
|
|
}
|
|
|
|
return chunks;
|
|
}
|
|
|
|
const chunks = {
|
|
vendors,
|
|
...renderChunks(),
|
|
};
|
|
|
|
export default chunks;
|