Answers for "svelte import svg"

1

svelte import svg

// You need a plugin to import anything other than JS files. Use this;

npm i -D rollup-plugin-svelte-svg

// And add it to your rollup.config.js like so;

import svelteSVG from "rollup-plugin-svelte-svg";
 
export default {
    entry: "src/input.js",
    dest: "dist/output.js",
    plugins: [
        svelteSVG(),
    ],
    ...
}
Posted by: Guest on February-24-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language