You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 20, 2020. It is now read-only.
If I install the latest version of extract-text-webpack-plugin(@2.1.0), I get the following error:
Error: Breaking change: ExtractTextPlugin now only takes a single argument. Either an options object *or* the name of the result file.
Example: if your old code looked like this:
new ExtractTextPlugin('css/[name].css', { disable: false, allChunks: true })
You would change it to:
new ExtractTextPlugin({ filename: 'css/[name].css', disable: false, allChunks: true })
They changed the signature of ExtractTextPlugin.
Maybe we can make it work for both versions by overriding fn_extract_text_plugin_css:
var fn_extract_text_plugin_css = require("extract-text-webpack-plugin");
if (fn_extract_text_plugin_css.length < 2) {
fn_extract_text_plugin_css = function (filename, options) {
options.filename = filename;
return require('extract-text-webpack-plugin')(options);
};
}