Assuming you have an entry pointing at just CSS files and use ExtractTextPlugin
to push those to a file of its own, webpack will still generate a file like this for the chunk:
webpackJsonp([1,3],[function(n,c){}]);
This does literally nothing. But unfortunately tooling like HtmlWebpackPlugin
will still generate a script
tag for it. It might be sensible to detect noop
cases like this and not to emit the JS files at all in these kind of cases.
Please avoid adding +1 comments, they only add confusion to the issue. Instead, add a reaction to the original comment
Solution: https://github.com/jamesjieye/html-webpack-exclude-assets-plugin
I made a fork of disable-output-webpack-plugin here https://github.com/Jorenm/disable-output-webpack-plugin/tree/options which lets you choose which files to block. I was able to nuke any JS files generated by my stylus compilation.
There is so many people having this problem… Is there any update about a fix… This issue is already 3 years old!😞
Hahaha don’t get your hopes up.