vue学习之——css预处理器:stylus-loader

1.stylus-loader简介

1.stylus-loader
使用模块化的方法去写css代码
2.使用过程
stylus-loader,用来处理stylus文件,处理完成之后是css代码,然后传给css-loader处理,
3.webpack的好处,很多个stylus搭配使用

2.安装stylus-loader和stylus插件

在控制台进入项目目录,输入如下命令

cnpm install --save stylus-loader stylus

3.新建stylus文件

//test-stylus,styl
body
  font-size 20px

4.在控制台输入自己的打包命令

cnpm run build

或者是

webpack

至此可以成功使用了

猜你喜欢

转载自blog.csdn.net/qq_36836277/article/details/88642298