-
-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support webpack@5 #186
Comments
I'm getting this error on webpack@4 w/ multiple compilers (e.g. |
I had the same problem and mine was caused by smart measure webpack plugin which may fail during incremental build. |
same problems. How to solve the problem? @mastilver |
I also have the same problem using the multi-compiler feature. How can we fix this? [email protected] |
Can you all confirm it's been fixed on 2.2.0? (thank you @ian-craig ) |
Thanks @mastilver 2.2.0 with Webpack 5.0.0-alpha.26 seems to be working correctly in my project. I just have a simple setup though, so no other plugins depending on the manifest or anything. |
There are other problems too:
|
Got same problem as @kirill-konshin . |
Seems to be working now, noticed one issue though: |
Hi, this error is still occurring with
Here's the line that is treating |
I wrapped
|
@keeganstreet Is somewhere possible to download a functional version of this plugin? No matter the Deprecation warning. I want to use some features of Webpack 5 but I want to have manifest as well. Thanks |
So I tried to make it work as @keeganstreet suggested with webpack.config.js - const ManifestPlugin = require('webpack-manifest-plugin');
+ const ManifestPlugin = require('./webpack-manifest-plugin'); // local file Then I downloaded the current JS file from the master branch. lib/plugin.js and saved it next to webpack-manifest-plugin.js // This changes is on line 87
- var files = compilation.chunks.reduce(function(files, chunk) {
+ var files = Array.from(compilation.chunks).reduce(function(files, chunk) {
// This changes is on line 128
// From Webpack 5, I think "the hack" where this code lives is not needed.
// So I'm returning files directly. Otherwise ignore the return and use the rest
- var isEntryAsset = asset.chunks.length > 0;
+ return files;
+ var isEntryAsset = Array.from(asset.chunks || []).length > 0; Hope this helps someone to use this plugin with Webpack 5 until the proper fix will be released. There are some pitfalls with this approach still. |
FYI, I've successfully used |
Hey folks, please see #222 for updates on v5 support. |
The text was updated successfully, but these errors were encountered: