Skip to content

build fails when webpack entry is empty #3952

@xinyuehtx

Description

@xinyuehtx

Describe the bug

Bug description

  • For remote App, I set webpack entry as an empty object
  • the build will failed for no matched module factory for EntryDependency
Image Image

Bug Reason

  • For webpack EntryOptionPlugin, when entry is empty, EntryPlugin will not be applied. So normalModuleFactory will not be bound for EntryDependency.
  • In ContainerEntryModule, an EntryDependency is used for building runtime entry.
Image Image Image

Reproduction

https://github.com/xinyuehtx/module-federation-error

Used Package Manager

pnpm

System Info

System:
    OS: macOS 15.5
    CPU: (11) arm64 Apple M3 Pro
    Memory: 208.41 MB / 36.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.16.0 - ~/.nvm/versions/node/v20.16.0/bin/node
    npm: 10.8.1 - ~/.nvm/versions/node/v20.16.0/bin/npm
    pnpm: 9.15.4 - ~/.nvm/versions/node/v20.16.0/bin/pnpm
  Browsers:
    Chrome: 138.0.7204.169
    Safari: 18.5

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions