Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postcss-less 报错 #4118

Closed
John251314 opened this issue Aug 9, 2019 · 2 comments
Closed

postcss-less 报错 #4118

John251314 opened this issue Aug 9, 2019 · 2 comments
Assignees

Comments

@John251314
Copy link

问题描述

使用less预编译语言,并开启CSSMoudles,在less文件中使用mixins报错;

1、在less中间中保存,编译不会报错,样式生效
2、在js文件中保存,编译报错
3、关闭cssMoudles,可正常使用

taro版本
"@tarojs/taro": "1.3.4"

复现步骤

  1. 新建taro工程,开启less,开启cssMoudles,global
  2. page对应的less文件中写函数式混入语法,并让其他class引用
  3. 保存less文件进行编译,无报错,样式生效
  4. 保存js文件进行编译,报错

// less代码

.test_mixins() {
    background-color: rebeccapurple;
}

.list {
    .test_mixins();
    margin-top: 24px;
}

期望行为
可正常使用

报错信息

image

系统信息

  • 操作系统: macOS 10.14.3
  • Taro 版本 Taro v1.3.4
  • Node.js 版本 8.12.0
  • 报错平台 weapp

补充信息
关闭CSSMoudle可正常使用

@taro-bot
Copy link

taro-bot bot commented Aug 9, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@taro-bot
Copy link

taro-bot bot commented Aug 12, 2019

CC @luckyadam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants