media-query-plugin
media-query-plugin copied to clipboard
Enhence the compatilbily of filename as Function, also using Entrypoint names as includes and groups
- With the codes inspired from https://github.com/Vyprichenko/media-query-plugin, the (output) filename can accept be set as function type (with is useful in using css-minimizer-webpack-plugin.
- Since Webpack accepts multi-entries, it's a strong need to use the entry name rather than the file names of input. However, there is no formal Loader API to get the entry name by native, so I use the loop to identify the entry name it should be. So if there are multiple entries set in the webpack.config, then the plugin conditions (includes and groups) would check the responding entry names as possible. The fallback would be checking the original filename of input.