Skip to content

Commit

Permalink
fix: federation: dont default to esm
Browse files Browse the repository at this point in the history
NX is breaking my builds due to the wrapper plugin here. Id not default to esm as module outputs are buggy and require several little config options to actually work correctly.

Can we please use var or window as default here?
  • Loading branch information
ScriptedAlchemy authored Mar 31, 2023
1 parent 77f2d0a commit f163914
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,12 @@ export async function withModuleFederation(

config.optimization = {
runtimeChunk: false,
};

config.experiments = {
...config.experiments,
outputModule: true,
};
};

config.plugins.push(
new ModuleFederationPlugin({
name: options.name,
library: options.library ?? { type: 'module' },
library: options.library ?? { type: 'window' },
filename: 'remoteEntry.js',
exposes: options.exposes,
remotes: mappedRemotes,
Expand Down

0 comments on commit f163914

Please sign in to comment.