一、如何在wepy中使用stylus

1、安装wepy-compiler-stylus(以及stylus, stylus-loader)

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

2、配置根目录下的wepy.config.js

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

3、修改.wpy文件中的style标签中的lang属性

<style lang="stylus">  
  .user-info  
    background red  
<style>  

  

相关文章:

  • 2021-11-07
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-07
猜你喜欢
  • 2021-11-07
  • 2022-12-23
  • 2022-01-02
  • 2021-08-15
  • 2022-12-23
  • 2021-05-20
  • 2021-08-04
相关资源
相似解决方案