refactor: module federation
All checks were successful
JS Unit Tests / test (pull_request) Successful in 16s
Build Test / build (pull_request) Successful in 20s
PHP Unit Tests / test (pull_request) Successful in 54s

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-02-22 12:35:56 -05:00
parent 8560aef5e2
commit bb05f3d20f
4 changed files with 35 additions and 16 deletions

View File

@@ -72,15 +72,16 @@ export default defineConfig(({ mode }) => ({
input: {
public: path.resolve(__dirname, 'core/src/public.html'),
private: path.resolve(__dirname, 'core/src/private.html'),
'shared-utils': path.resolve(__dirname, 'core/src/utils/helpers/shared.ts'),
'ktxc': path.resolve(__dirname, 'core/src/shared/index.ts'),
},
preserveEntrySignatures: 'exports-only',
output: {
// Preserve export names for shared-utils (used via import map by modules)
// Preserve export names for ktxc (used via import map by modules)
minifyInternalExports: false,
entryFileNames: (chunkInfo) => {
// Keep shared-utils without hash for stable import map reference
if (chunkInfo.name === 'shared-utils') {
return `js/[name].js`;
// Keep ktxc without hash for stable import map references
if (chunkInfo.name === 'ktxc') {
return `js/ktxc.mjs`;
}
return `js/[name]-[hash].js`;
},