Vue-loader has CSS loader properties configured.

Source: Internet
Author: User
Tags postcss

Tags in:svg    file    ast   ref   logs     existence    sse    path    include   

  Module: {loaders: [//Here is the corresponding configuration, test is the matching file, loader is the loader, {test:/\.vue$/, Loader:            ' Vue '}, {test:/\.js$/, Loader: ' Babel ', Include:projectroot,            Exclude:/node_modules/}, {test:/\.json$/, Loader: ' JSON '},/* {            Test:/\.css$/,//This is commented out of the module, at first it is very confusing to join the CSS compiler module immediately error, comments out after the Sass code can still be compiled successfully. Loader: ["Vue-style-loader", "Css-loader"]}, {test:/\.less$/, loader: ["vue-style-l Oader "," Css-loader "," Less-loader "]}, {test:/\. (            Scss|sass) $/, loader: ["Node-sass", "Vue-style-loader", "Css-loader", "Sass-loader"]}, { Test:/\.scss/, loaders: [' css ', ' autoprefixer ', ' sass '],},*/{test:/\. ( png|jpe?g|gif|svg) (\?.    *)? $/, loader: ' URL ', query: {limit:10000,          Name:utils.assetsPath (' img/[name].[ Hash:7]. [ext] ')}}, {test:/\. ( woff2?| EOT|TTF|OTF) (\?. *)? $/, loader: ' URL ', query: {limit:10000, Name:utils.assetsPath (' Fonts /[name]. [Hash:7]. [ext] ')}]},//Vue-loader configuration vue: {///The following is clear//Vue-loader already configured Loaders:utils.cssLoaders ({Sourcemap:usecsssourcemap}),//Load CSS Configuration module//Autoprefixer is a POSTCSS-based smart add CSS prefix plug-in POSTCSS: [Require (' AUTOPR Efixer ') ({browsers: [' last 2 versions ']//means only the latest two versions of the mainstream browser (in fact, do not do compatible, the modern latest browser basically does not need to be compatible)})]}

  

    1. To configure a static resource path
    2. Build cssloaders to load the styles in the. Vue file
    3. Generate styleloaders to load a separate style file that is not in the. vue file

Vue-loader only configures the CSS loader and automatically adds prefixes after compiling the CSS. (so you can compile the sass style directly inside the. Vue file)

Vue-loader has CSS loader properties configured.

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.