If you're using the starter template, you should already have rollup-plugin-node-resolve and rollup-plugin-commonjs plugins installed, it should Just Work. Indeed, adding
import buildUrl from 'build-url';
to a component in a fresh project works exactly as you'd expect. Are you getting any error messages? Have you done npm install build-url?
npm install build-url
For future reference, questions like these are better asked over on Stack Overflow using the svelte tag, or in svelte.dev/chat, than on dev.to which is more for blog posts etc than support requests.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
If you're using the starter template, you should already have rollup-plugin-node-resolve and rollup-plugin-commonjs plugins installed, it should Just Work. Indeed, adding
to a component in a fresh project works exactly as you'd expect. Are you getting any error messages? Have you done
npm install build-url
?For future reference, questions like these are better asked over on Stack Overflow using the svelte tag, or in svelte.dev/chat, than on dev.to which is more for blog posts etc than support requests.