cascornelissen / svg-spritemap-webpack-plugin

SVG spritemap plugin for webpack
MIT License
207 stars 51 forks source link

Why is svg4everybody-helper.js added to node_modules after Webpack runs? #107

Closed ajlond123 closed 4 years ago

ajlond123 commented 4 years ago

Why is "svg4everybody-helper.js" added to the root of the node_module folder after running webpack?

This is causing issues with our gitlab deploy pipelines, as the webpack stage is expecting that file to already exist in the folder.

cascornelissen commented 4 years ago

I guess you mean in the node_modules/svg-spritemap-webpack-plugin/ directory (not in node_modules/ directly), right?

It's a bit of an ugly workaround to make it easier for developers to use SVG4Everybody together with this plugin but I can image that it might break more advanced setups. The easiest fix would be to set the output.svg4everybody option to false and include the polyfill manually.

ajlond123 commented 4 years ago

@cascornelissen - Yes I did mean in the node_modules/svg-spritemap-webpack-plugin/ directory.

Thanks for the suggestion. I've disabled the option and included svg4everybody as a separate polyfill.