Skip to content

Commit

Permalink
fix: [node] build error when no remotes are used (module-federation#500)
Browse files Browse the repository at this point in the history
  • Loading branch information
ScriptedAlchemy authored and RussellCanfield committed Jan 11, 2023
1 parent 94e4d90 commit 1b4f523
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class ReadFileChunkLoadingRuntimeModule extends RuntimeModule {
// remotes only use fs.readFile if we were to cache the chunks on disk after fetching - otherwise its always using http
// so for example, if im in hostA and require(remoteb/module) --> console.log of name in runtime code will return remoteb

const {remotes, name} = this.options;
const {remotes = {}, name} = this.options;
const {webpack} = this.chunkLoadingContext;
const chunkHasJs =
(webpack && webpack.javascript.JavascriptModulesPlugin.chunkHasJs) ||
Expand Down

0 comments on commit 1b4f523

Please sign in to comment.