Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/burhanuday/webpack-mf-split-chunks-repro
Reproduction of the issue where webpack build crashes when using `splitChunks` with ModuleFederationPlugin.
https://github.com/burhanuday/webpack-mf-split-chunks-repro
Last synced: 15 days ago
JSON representation
Reproduction of the issue where webpack build crashes when using `splitChunks` with ModuleFederationPlugin.
- Host: GitHub
- URL: https://github.com/burhanuday/webpack-mf-split-chunks-repro
- Owner: burhanuday
- Created: 2023-03-15T06:05:20.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-03-15T06:05:39.000Z (over 1 year ago)
- Last Synced: 2024-05-28T16:15:04.011Z (6 months ago)
- Language: JavaScript
- Size: 75.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# webpack-mf-split-chunks-repro
Reproduction of the issue where webpack build crashes when using `splitChunks` with ModuleFederationPlugin.
To reproduce:
In the root of the repository, run```shell
yarn
```Then in two separate terminals, cd into `host` and `remote` folder, run
```shell
yarn start
```Go to localhost:8080 and you should see the following error in the console:
```shell
Uncaught (in promise) ScriptExternalLoadError: Loading script failed.
(missing: http://localhost:8081/remoteEntry.js)
while loading "./RemoteApp" from webpack/container/reference/remote
at webpack/container/reference/remote (main.js:29:25)
at __webpack_require__ (main.js:71:33)
at initExternal (main.js:336:28)
at __webpack_require__.I (main.js:349:15)
at main.js:838:47
at webpack/sharing/consume/default/react/react (main.js:892:67)
at main.js:923:56
at Array.forEach ()
at __webpack_require__.f.consumes (main.js:906:36)
at main.js:154:40```
The issue disappears when `splitChunks` is removed from `webpack.config.js` in `host` and `remote` folder.