DEV Community

[Comment from a deleted post]
Collapse
 
ajcwebdev profile image
ajcwebdev

Hey Krupal, that's a really great question. I'm a terrible frontend developer and don't know anything about CSS, so I forwarded this question to the SvelteKit Discord server and received the following response, hopefully it is helpful:

I've got svelte-preprocess and sass in my devDependencies

In svelte.config.js:

import sveltePreprocess from 'svelte-preprocess';

/** @type {import('@sveltejs/kit').Config} */
const config = {
  preprocess: sveltePreprocess(),
  kit: {
    // hydrate the <div id="svelte"> element in src/app.html
    target: '#svelte',
  },
};

export default config;
Enter fullscreen mode Exit fullscreen mode

I just upgraded sveltekit and had to update that from original the .cjs file. IIRC the other difference from svelte is that you add a different attribute on your style tag to mark it as scss: <style lang="scss">