codefeathers / rollup-plugin-svelte-svg

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

[!] Error: Could not load .../myfile.svg.rollup-plugin.svelte.rollup-plugin.svelte #37

Open CherryDT opened 7 months ago

CherryDT commented 7 months ago

I'm using Rollup and I'm getting this error:

[!] Error: Could not load /mnt/c/Users/xxx/proj/xxx/public/images/myfile.svg.rollup-plugin.svelte.rollup-plugin.svelte (imported by src/client/components/MyComponent.svelte): ENOENT: no such file or directory, open '/mnt/c/Users/xxx/proj/xxx/public/images/myfile.svg.rollup-plugin.svelte.rollup-plugin.svelte'

I only load svelteSVG once, I don't know why it shows the .rollup-plugin.svelte part twice here...

MKRhere commented 7 months ago

Do you have a rollup config I can repro this with?

CherryDT commented 7 months ago

See attached minimal example. Extract, run npm install, run npm run build, observe error.

repro.tgz

(Edit: Redownload please, a file was missing.)