
Vue.config.js

when i install sass and sass-loader how can i to configure to use sass
Now i use sass tips error Cannot find module 'sass' from 'D:\demo\vite'


Vue.config.js

when i install sass and sass-loader how can i to configure to use sass
Now i use sass tips error Cannot find module 'sass' from 'D:\demo\vite'

You just need to install sass using the following command
npm install -D sass
Also, you may check the official docs here https://vitejs.dev/guide/features.html#css-modules
In other answers, they're using yarn or npm but If you're using pnpm:
pnpm i -D sass
i is an alias for install:
-d flag:
btw if you aready did npm i sass you can perfectly do npm i -D sass the changes will be made automagically!