modify-source-webpack-plugin
modify-source-webpack-plugin copied to clipboard
Supported file types?
I want to replace the whole source of my .vue file before it's picked for compilation. Will your plugin help with any type of resource (or) is it only for JS? I did notice a closed issue w.r.t support for css file, but it didn't answer if your plugin was later updated to be agnostic to the resource type.
Thanks a lot for this plugin!
Hi. Thank you for the kind words. Plugin is agnostic to the resource types but there exists rare case where modification of original modules doesn't work because some loaders create copies of this modules with some extra information in filename. vue-cli uses special filenames for modules for internal processing. For example, exists module App.vue. vua-loader will create new module based on this with name App.vue?vue&type=template&id=7ba5bd90 and other like this. And we should modify specifically the last ones.
I've created example how you can handle .vue files in Vue project. Please note which regular expression do I use.