mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-23 16:23:41 +00:00
50a252fdd7
* Replace Create-React-App with Vite.js * Update React-Router to v6 * Cleanup unused codes
30 lines
464 B
TypeScript
30 lines
464 B
TypeScript
import { dependencies } from "../package.json";
|
|
|
|
const vendors = [
|
|
"react",
|
|
"react-redux",
|
|
"react-router-dom",
|
|
"react-dom",
|
|
"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;
|