vite使用scss
时间: 2024-03-02 22:20:56 浏览: 135
要在Vite中使用SCSS,您可以按照以下步骤进行配置:
1. 在项目中安装sass和sass-loader依赖项:
```
npm install sass --save-dev
npm install sass-loader --save-dev
```
2. 在vite.config.js文件中进行配置。您可以使用以下代码片段作为参考:
#### 引用[.reference_title]
- *1* [Vite 配置 Scss](https://blog.csdn.net/maoxiaoyon/article/details/125861605)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [在Vite中配置scss并使用](https://blog.csdn.net/Th_rob/article/details/125595743)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [vue项目中全局引入1个.scss文件的问题解决](https://download.csdn.net/download/weixin_38637878/13666813)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文