Use SASS or SCSS syntax configuration in Vue (not used)

Source: Internet
Author: User
Tags install node npm install node
Use sass or scss syntax configuration

Installation sass dependencies sass-loader and node-sass :

npm i sass-loader node-sass -D

After installation, there may be Node-sass installation failure, the reason and the solution can be referred to here, can be resolved by running the following command directly at the command line:

SASS_BINARY_SITE=https://npm.taobao.org/mirrors/node-sass/ npm install node-sass

Then webpack.base.conf.js add the relevant configuration in:

{    test: /\.s[a|c]ss$/,    loader: ‘style!css!sass‘}

There is also the .vue use of the <style> best configuration in the

<style lang="scss"></style>

Because  lang="sass" using the nested syntax, if you want to support the syntax of CSS sugar uselang="scss"

Use SASS or SCSS syntax configuration in Vue (not used)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.