I started using this plugin in my current project at work and found two major things we needed for this to work properly in our setup. We are using a Vue setup with Webpack that builds everything together, nothing too fancy. The issue was that the files were all named index.vue, simply for ease of use in import/require instances. And instead, the components would have a unique folder, named after the component, that would then contain a index.vue file.
This caused an issue where we didn't have the option to either define components to be included, because all components were named index according to the plugin. And if we included all the components, using the include: true; option, they would all overwrite each other as index-[queryname].css files.
This PR adds an option to control the output filename for each extracted CSS, allowing us in this case to use the file path to determine the correct filename.
This is of course not necessary to add to your plugin, as we can use my fork of it. But I figured it could be useful for other people. 🙂
I started using this plugin in my current project at work and found two major things we needed for this to work properly in our setup. We are using a Vue setup with Webpack that builds everything together, nothing too fancy. The issue was that the files were all named
index.vue
, simply for ease of use in import/require instances. And instead, the components would have a unique folder, named after the component, that would then contain aindex.vue
file.This caused an issue where we didn't have the option to either define components to be included, because all components were named
index
according to the plugin. And if we included all the components, using theinclude: true;
option, they would all overwrite each other asindex-[queryname].css
files.This PR adds an option to control the output filename for each extracted CSS, allowing us in this case to use the file path to determine the correct filename.
This is of course not necessary to add to your plugin, as we can use my fork of it. But I figured it could be useful for other people. 🙂