Support Webpack 5
See original GitHub issue🐛 Bug Report
When I build with webpack 5.0.0-rc.0, I have an error TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Object
, because in loadable-stats.json
field assets
generated as
"assets": [{ "name": "assetname.js" }]
but chunkExtractor
expects
"assets": ["assetname.js"]
To Reproduce
Steps to reproduce the behavior:
- Use webpack 5.0.0-rc.0
- loadable-stats:
"assets": [
{
"name": "assetname.js"
}
]
Expected behavior
Support new schema of assets
## System:
- OS: macOS 10.15.6
- CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
- Memory: 1.45 GB / 16.00 GB
- Shell: 5.7.1 - /bin/zsh
## Binaries:
- Node: 14.9.0 - ~/.nvm/versions/node/v14.9.0/bin/node
- Yarn: 1.22.4 - /usr/local/bin/yarn
- npm: 6.14.8 - ~/.nvm/versions/node/v14.9.0/bin/npm
## npmPackages:
- @loadable/babel-plugin: 5.13.2 => 5.13.2
- @loadable/component: 5.13.2 => 5.13.2
- @loadable/server: 5.13.2 => 5.13.2
- @loadable/webpack-plugin: 5.13.0 => 5.13.0
Issue Analytics
- State:
- Created 3 years ago
- Reactions:16
- Comments:42 (4 by maintainers)
Top Results From Across the Web
To v5 from v4 - webpack
This guide aims to help you migrating to webpack 5 when using webpack directly. If you are using a higher level tool to...
Read more >facebook/create-react-app - Webpack 5 support overview
Overview of tasks needed for updating CRA to Webpack 5 - Some of the work will support both Webpack 4 + 5 but...
Read more >Webpack 5 Adoption - Next.js
Next.js has adopted webpack 5 as the default for compilation. We've spent a lot of effort into ensuring the transition from webpack 4...
Read more >Upgrading Webpack 4 → 5 | Square Corner Blog
We used mocha-webpack to build and run our mocha tests. We realized mocha-webpack didn't support Webpack 5 and is no longer maintained. There ......
Read more >Webpack 5 Migration - Nx
Webpack 5 comes with Nx 13, and your apps should work as long as you use compatible webpack plugins (or don't have customized...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any progress?
The new version with webpack5 support has not yet been released. I am working on a proper test to ensure everything is working properly.