Closed Dan503 closed 1 year ago
I was able to reproduce it, but still investigating why this could happen.
It works for me on SvelteKit 1.0 by adding it to the Vite config instead:
import { sveltekit } from '@sveltejs/kit/vite';
import { svelteSVG } from 'rollup-plugin-svelte-svg';
/** @type {import('vite').UserConfig} */
const config = {
plugins: [
sveltekit(),
svelteSVG({
svgo: {
plugins: [
{
name: 'preset-default',
params: {
overrides: {
removeViewBox: false,
},
},
},
'removeXMLNS',
],
},
// https://vitejs.dev/guide/api-plugin.html#plugin-ordering
enforce: 'pre',
}),
],
};
export default config;
Thank you @notsidney! I'll update the README.
This is SvelteKit: https://kit.svelte.dev/
This is my svelte.config.js file
I'm importing it like this in a svelte file:
I am getting this error though: