excellentingenuity / laravel-mix-vue-svgicon

Laravel Mix extension that provides loading svgs as a vue component named icon, compatible with Adam Wathan's Blade extension.
MIT License
20 stars 3 forks source link

Update regexp for target rule #2

Closed mikaeljorhult closed 5 years ago

mikaeljorhult commented 5 years ago

Fixes issue where loader rule isn't replaced for SVGs (causing file-loader to be used instead of html-loader) and plugin only outputting filename instead of actual SVG code.

Fixes #1

mikaeljorhult commented 5 years ago

Sorry, I should have been more explicit in the description.

The targetRegex variable is declaring what regexp to check for and then override. Since the regexp has been changed in Mix it no longer matches the if statement and the SVG part not being omitted from the rule. This causes Mix to use its own handling of SVG.