Adding Scss to Svelte Js
Install Svelte with vite
npm create vite@latest
Project name : project
Framework : SvelteJs
Language : JavaScript
cd project
npm i
npm i svelte-preprocess node-sass --save--dev
npm i sass --save--dev
import { defineConfig } from 'vite'
import { svelte } from '@sveltejs/vite-plugin-svelte'
import { sveltePreprocess } from 'svelte-preprocess/dist/autoProcess'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [svelte({
preprocess: sveltePreprocess()
})],
})
Restart the VS-Code and Run the Command
npm run dev
Project : Localhost:5173