Closed bersling closed 1 year ago
Could you explain why? I understand that theoretically everything in Svelte
is a devDependency since it's all compiled, but I think the distinction still makes sense.
Could you explain why? I understand that theoretically everything in
Svelte
is a devDependency since it's all compiled, but I think the distinction still makes sense.
Dev dependencies are used for sites - e.g. if you're making a Svelte Library, generally, svelte-confetti
would be used as a display for the Demo site, not the library itself. In the case of a normal Svelte / SvelteKit site, dev dependencies are preferred (simply as a style reason), and are generally standard across different libraries.
(Forwarding to @Mitcheljager)
I second this pull request. After running npm install --save svelte-confetti
as indicated in the instructions, I got an error and my Cloudflare deployment failed but not the case after running npm install -D svelte-confetti
. Advice I followed on Discord to avoid this error is to install as a devDependency and that worked. It's the only thing I changed and I went from failed deployment to successful.
My error message was:
[vite]: Rollup failed to resolve import "svelte-confetti" from "/opt/buildhome/repo/src/routes/+layout.svelte".
Fair enough, I'll merge it in!
Change from
npm install --save svelte-confetti
tonpm install --save-dev svelte-confetti