Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to use scss function in vue

Shulou Source: shulou.com Published: 2022-05-31 13:23:01 09月24日 Update

This article mainly introduces the relevant knowledge of how to use the scss function in vue, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value, I believe you will have something to gain after reading this vue article on how to use the scss function, let's take a look.

This article mainly introduces the relevant knowledge of "how vue uses the scss function". The editor shows you the operation process through the actual case. The operation method is simple, fast and practical. I hope this article "how to use the scss function in vue" can help you solve the problem.

The specific steps are as follows:

1. First, create a vue.js project in vue-cli

Vue init webpack myvue

After the 2.vue.js project is created, use the npm command to install the sass dependency package

Npm install sass-loader-save-devnpm install node-sass-sava-dev

After the 3.sass dependency package is installed, configure the following in the webpack.base.conf.js file

{test: /\ .scss $/, loaders: ['style',' css', 'sass']}

4. Finally, after the webpack.base.conf.js file is configured, you can use the scss function by adding the lang= "scss" attribute to the style tag

$color:red;div {color:$color;}

This is the end of the introduction to "how vue uses the scss function". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

This is the end of the article on "how to use scss functions in vue". Thank you for reading! I believe that everyone has a certain understanding of the knowledge of "how to use scss function in vue". If you want to learn more, you are welcome to follow the industry information channel.

Tags: Functions knowledge content articles industries documents articles more information information channels projects channels configurations different practical value commands practicality actual properties Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker macOS OPPO Reno Microsoft vpn