mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-01-26 08:39:09 +03:00
improve chunking and fix circular refs
This commit is contained in:
@@ -136,9 +136,16 @@ const createManualChunks = (detailed = false) => {
|
|||||||
return 'vendor';
|
return 'vendor';
|
||||||
}
|
}
|
||||||
if (detailed) {
|
if (detailed) {
|
||||||
if (id.includes('components/')) return 'components';
|
// Group circularly dependent modules together to avoid circular chunk warnings
|
||||||
if (id.includes('app/')) return 'app';
|
// components, app, and utils are tightly coupled, so combine them
|
||||||
if (id.includes('utils/')) return 'utils';
|
if (
|
||||||
|
id.includes('components/') ||
|
||||||
|
id.includes('app/') ||
|
||||||
|
id.includes('utils/')
|
||||||
|
) {
|
||||||
|
return 'app';
|
||||||
|
}
|
||||||
|
// Keep api separate as it's typically more independent
|
||||||
if (id.includes('api/')) return 'api';
|
if (id.includes('api/')) return 'api';
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|||||||
Reference in New Issue
Block a user