Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: increase compatibility during build process #153

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ function federation(mfUserOptions: ModuleFederationOptions): Plugin[] {
return (
id.includes(getHostAutoInitImportId()) ||
id.includes(REMOTE_ENTRY_ID) ||
id.includes(VIRTUAL_EXPOSES) ||
id.includes(getLocalSharedImportMapPath())
);
}),
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/pluginModuleParseEnd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ export default function (excludeFn: Function): Plugin[] {
apply: 'build',
moduleParsed(module) {
const id = module.id;
if (excludeFn(id)) {
return;
}
if (id === VIRTUAL_EXPOSES) {
// When the entry JS file is empty and only contains exposes export code, it’s necessary to wait for the exposes modules to be resolved in order to collect the dependencies being used.
exposesParseEnd = true;
}
if (excludeFn(id)) {
return;
}
parseEndSet.add(id);
if (exposesParseEnd && parseStartSet.size === parseEndSet.size) {
_resolve(1);
Expand Down