Skip to content

Commit

Permalink
fix: update references to .mjs not .js for esm
Browse files Browse the repository at this point in the history
  • Loading branch information
ScriptedAlchemy committed Nov 2, 2024
1 parent 680fc9e commit 7715b99
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/data-prefetch/src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class PrefetchPlugin implements WebpackPluginInstance {
this.options.runtimePlugins = [];
}

const runtimePath = path.resolve(__dirname, './plugin.esm.js');
const runtimePath = path.resolve(__dirname, './plugin.esm.mjs');
if (!this.options.runtimePlugins?.includes(runtimePath)) {
this.options.runtimePlugins!.push(runtimePath);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ class FederationRuntimePlugin {
if (this.options?.experiments?.federationRuntime === 'hoisted') {
this.bundlerRuntimePath = this.bundlerRuntimePath.replace(
'.cjs.js',
'.esm.js',
'.esm.mjs',
);

new EmbedFederationRuntimePlugin().apply(compiler);
Expand Down
2 changes: 1 addition & 1 deletion packages/rspack/src/ModuleFederationPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class ModuleFederationPlugin implements RspackPluginInstance {
).apply(compiler);

const runtimeESMPath = require.resolve(
'@module-federation/runtime/dist/index.esm.js',
'@module-federation/runtime/dist/index.esm.mjs',
{ paths: [options.implementation] },
);

Expand Down

0 comments on commit 7715b99

Please sign in to comment.