codefeathers / rollup-plugin-svelte-svg

Import SVG files as Svelte Components
MIT License
75 stars 13 forks source link

Fix integration with other resolve-related plugins #30

Closed rraihansaputra closed 2 years ago

rraihansaputra commented 2 years ago

Currently this plugin doesn't work when the SVG path needs to be resolved by other plugins, as resolveId would append the default path.

By using this.resolve, rollup would let other plugins such as alias or node-resolve to resolve the proper id/path first, then svelteSVG can append .svelte to it.

rraihansaputra commented 2 years ago

Fixed on https://github.com/codefeathers/rollup-plugin-svelte-svg/commit/79888d8bb7b798654444260e1613731cc31cef74 while resolving https://github.com/codefeathers/rollup-plugin-svelte-svg/issues/31

MKRhere commented 2 years ago

Thank you for the PR; I had missed this before. I'd noticed your snippet on the other issue and had issued a fix based on it.