-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Hello,
I am trying to use Vite to build my project into a remote module-federated application. However, due to my company's policy, we cannot move to ESM yet because we still need to support old browsers.
I am trying to build the module in to UMD format, however, seems like the module-federation/vite plugin always add pre-defined chunks (loadShare / remoteInit) into final bundle, so rollup thinks it is a code-splitting build. This fails rollup's internal validation.
Other formats also do not work:
- There's a separate bug in systemJS that breaks
'system'with shared dependencies. 'amd'and'cjs'also do not work because my app has shared dependencies, adding shared dependencies uses top-level await which is not supported.iifedoes not work similar to UMD.
Version
6.0.5
Reproduction
https://github.com/peawyoyoyin/mfe-vite-umd-issue-reproduction
Relevant log output
error during build:
Invalid value "umd" for option "output.format" - UMD and IIFE output formats are not supported for code-splitting builds.Validations
- Read the docs.
- Read the common issues list.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working