Skip to content

Stusu/nx-dynamic-mf-issues

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

App generated with:

npx create-nx-workspace@latest frontend --preset=apps

npm install --save-dev @nx/react

nx g @nx/react:host host --directory=apps/host --remotes=first-remote

Issue:

When I switched static module federation to dynamic it appears that - character is not allowed in remote name. The application crashed at runtime with following error:

Error Issue place

I've tried to fix it with modifying first-remote/module-federation.config.ts with:

import { ModuleFederationConfig } from '@nx/webpack';

const config: ModuleFederationConfig = {
  name: 'first-remote',
  library: {
    name: 'first-remote',
    type: 'var',
  },
  exposes: {
    './Module': './src/remote-entry.ts',
  },
};

export default config;

what resulted with build error: Build error

The issue can be fixed with remote name change like here: #1, but it should be not allowed upfront to set such name, or console should show some warning about it.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published