SassNinja/media-query-plugin

Missing support for Webpack 5.0 filename being a function

Nya-chan opened this issue · 0 comments

In WP5 you can now use functions for file output path (see https://webpack.js.org/configuration/output/#outputfilename , can also be used in MiniCssExtractPlugin and others)
The plugin currently only supports filename being a string / with a template and fails on providing a correct function that returns a string with such filename:

/node_modules/media-query-plugin/src/plugin.js:83
                                        .replace('[name]', mediaKey)
                                         ^

TypeError: this.options.filename.replace is not a function
    at /frontend/node_modules/media-query-plugin/src/plugin.js:83:42