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
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: