Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sikandarjodd/svelte-js-with-scss

Adding Scss to Svelte Js
https://github.com/sikandarjodd/svelte-js-with-scss

sass sass-framework scss svelte svelte-scss sveltejs sveltejs-language

Last synced: 5 days ago
JSON representation

Adding Scss to Svelte Js

Awesome Lists containing this project

README

        

Svelte Js with Scss


css-in-readme

Adding Scss to Svelte Js

## Installation

Install Svelte with vite

```bash
npm create vite@latest
```

```bash
Project name : project
Framework : SvelteJs
Language : JavaScript

```

```bash
cd project
npm i
```

```bash
npm i svelte-preprocess node-sass --save--dev
npm i sass --save--dev
```

## Edti vite.config.js

```bash
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

```bash
npm run dev
```

Project : [Localhost:5173](http://localhost:5173)

## package.json Code :

![Screenshot](PackageImg.PNG)

## Running on port : 5173

![Screenshot](output.png)

## Scss Code in App.svelte

![Screenshot](Code.PNG)