question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:

  1. Use webpack 5.0.0-rc.0
  2. 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:closed
  • Created 3 years ago
  • Reactions:16
  • Comments:42 (4 by maintainers)

github_iconTop GitHub Comments

19reactions
xnerhucommented, Nov 5, 2020

Any progress?

15reactions
theKasheycommented, Oct 14, 2020

The new version with webpack5 support has not yet been released. I am working on a proper test to ensure everything is working properly.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found