Skip to content

Updating SASS #12710

Answered by mojoaxel
orangecoloured asked this question in Q&A
Sep 24, 2024 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

For me this stack-overflow answer solved this problem:

The default API when using Vite is currently set to legacy, but you can change it in your vite.config.[js/ts].

export default defineConfig({
 css: {
   preprocessorOptions: {
     scss: {
       api: 'modern-compiler' // or "modern"
     }
   }
 }
})

Reference: https://vitejs.dev/config/shared-options#css-preprocessoroptions

https://stackoverflow.com/a/79003101/722162 (CC-BY-SA by hiws)
Tested with [email protected] and [email protected].

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@orangecoloured
Comment options

@cheekybuddha
Comment options

Answer selected by orangecoloured

This comment was marked as spam.

@mojoaxel
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants