Open jmesa-sistel opened 5 years ago
@gajus do you know how to fix the plugin if futureEmitAssets is true ?
I do not. PR is welcome.
I've notice that they have the same problem. Webpack implemented writeToDisk in web dev server and it's not working also, you will have the same error, I guess they will have to fix it, so you can copy the solution, but I guess they will remove that option, as you can read in comment (problem in webpack with writeToDisk ) writetodisk info
Any updates on this?
It seems like anything that reads the asset after it's been emitted will throw based on this: https://github.com/webpack/webpack/pull/8642
It seems like HandleAfterEmit
is the most likely culprit? Can any of that work be done before emitting instead?
Anyone is welcome to contribute a solution.
@gajus At now there is a workaround. I have posted it in first post:
module.exports.output.futureEmitAssets = false;
In webpack 5 they have removed this variable
// TODO webpack 5 remove futureEmitAssets option and make it on by default
Hello, after upgrading from webpack 4.41.5
to webpack 5.75.0
I started having this issue. As I need webpack to emit the dist files even if it's in dev mode I dug through some threads and documentation and came across the following:
I've added to my development configuration the mentioned option and it works as expected :
module.exports = {
// your other options
optimization: {
// Your optimization options
},
plugins: [
// your plugins
],
devServer: {
devMiddleware: {
writeToDisk: true, // <= what you need to add
},
},
};
Hope this helps.
Due to this commit add output.futureEmitAssets your plugin is not working anymore on new web dev server. Do you have a workaround?
Edit: I found the work around: