rollup-plugin-svelte-svg icon indicating copy to clipboard operation
rollup-plugin-svelte-svg copied to clipboard

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

Open CherryDT opened this issue 1 year ago • 2 comments
trafficstars

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...

CherryDT avatar Dec 31 '23 12:12 CherryDT

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

MKRhere avatar Jan 02 '24 08:01 MKRhere

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

repro.tgz

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

CherryDT avatar Jan 04 '24 14:01 CherryDT

Closing issues before archiving the repository. Svelte supports importing SVGs natively now.

MKRhere avatar May 17 '25 04:05 MKRhere