您好,欢迎来到知库网。
搜索
您的当前位置:首页如何在wepy中使用stylus

如何在wepy中使用stylus

来源:知库网

如何在wepy中使用stylus

第一步,安装wepy-compiler-stylus(以及stylus, stylus-loader)

npm install wepy-compiler-stylus --save-dev 

第二步,配置根目录下的wepy.config.js

# wepy.config.js
module.export = {  
  // ...其他配置  
  compilers: {  
    // ...其他配置  
    // 添加以下内容  
    stylus: {  
      compress: true  
    }  
  }  
}  

第三步,修改.wpy文件中的style标签中的lang属性

# 现在就可以使用了
<style lang="stylus">  
  .user-info  
    background red  
<style> 

Copyright © 2019- zicool.com 版权所有 湘ICP备2023022495号-2

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务