In my SvelteKit project I am using SCSS and in order to include some mixins that are used throughout the project, I switched from vitePreprocess
to svelte-preprocess
and prepended them with scss.prependData
. Now my config looks like this:
const config = { preprocess: preprocess({ scss: { prependData: `@import './src/styles/prepend.scss';`, }, }), // .. // Other options not relevant to the question}
Since the official SvelteKit docs suggest that vitePreprocess
might be faster, I was wondering if I can set up global mixins with it.
I tried importing prepend.scss
in my root +layout.svelte
file but now I'm getting an Undefined mixin
error.
Can I use mixins with vitePreprocess
or is svelte-preprocess
the only way to achieve this at the moment?