0

I want to create a css file from scss and this file has to save the changes after i stop writing.

Where do I have to define it in Vite and how to do it? I am using Vue 3.

Throw
  • 1

1 Answers1

0

With Vite you can just npm i -D sass, create a style.scss file for example in the src/assets/styles folder.
If you need to add it globally, just include it in your main.js/.ts file like:

@import "@/assets/styles/style.scss"

Otherwise add the same line in the component <style lang="scss" scoped> tag.

Nicola Spadari
  • 549
  • 3
  • 10
  • And how can I get change the path this file ? I want create 2 folders 1) SCSS 2) CSS – Throw Jul 17 '22 at 11:35
  • When I'm done writing in scss, I would like the changes to be saved in css. – Throw Jul 17 '22 at 11:43
  • You won't get css files directly when typing, that's something that needs to be done in html files because they don't have a tool like vite, the css will be compiled together once you run `npm run build` – Nicola Spadari Jul 17 '22 at 12:33