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

Taro v2.2.3 #ifdef判断在微信小程序build模式下失效 #6218

Closed
divcss3 opened this issue May 6, 2020 · 2 comments
Closed

Taro v2.2.3 #ifdef判断在微信小程序build模式下失效 #6218

divcss3 opened this issue May 6, 2020 · 2 comments
Assignees

Comments

@divcss3
Copy link

divcss3 commented May 6, 2020

问题描述

#ifdef判断在微信小程序build模式下失效

复现步骤

  1. npx @tarojs/cli init myApp
  2. 在app.scss添加以下代码
    image
  3. 执行npm run build:weapp
  4. 结果输出如图中右侧内容,npm run dev:weapp则正常
/*  #ifdef weapp  */
.weapp {
  color: red;
}
/*  #endif  */

/*  #ifdef h5  */
.h5 {
  color: pink;
}
/*  #endif  */

期望行为

报错信息

系统信息

👽 Taro v2.2.3

Taro CLI 2.2.3 environment info:
System:
OS: macOS 10.14.6
Shell: 5.3 - /bin/zsh
Binaries:
Node: 12.16.1 - /usr/local/bin/node
npm: 6.13.4 - /usr/local/bin/npm
npmPackages:
@tarojs/cli: 2.2.3 => 2.2.3
@tarojs/components: 2.2.3 => 2.2.3
@tarojs/components-qa: 2.2.3 => 2.2.3
@tarojs/mini-runner: 2.2.3 => 2.2.3
@tarojs/mobx: 2.2.3 => 2.2.3
@tarojs/mobx-h5: 2.2.3 => 2.2.3
@tarojs/router: 2.2.3 => 2.2.3
@tarojs/taro: 2.2.3 => 2.2.3
@tarojs/taro-alipay: 2.2.3 => 2.2.3
@tarojs/taro-h5: 2.2.3 => 2.2.3
@tarojs/taro-qq: 2.2.3 => 2.2.3
@tarojs/taro-quickapp: 2.2.3 => 2.2.3
@tarojs/taro-swan: 2.2.3 => 2.2.3
@tarojs/taro-tt: 2.2.3 => 2.2.3
@tarojs/taro-weapp: 2.2.3 => 2.2.3
@tarojs/webpack-runner: 2.2.3 => 2.2.3
eslint-config-taro: 2.2.3 => 2.2.3
eslint-plugin-taro: 2.2.3 => 2.2.3
nerv-devtools: ^1.5.6 => 1.5.6
nervjs: ^1.5.6 => 1.5.6
stylelint-config-taro-rn: 2.2.3 => 2.2.3
stylelint-taro-rn: 2.2.3 => 2.2.3
taro-ui: ^2.2.4 => 2.2.4

补充信息

如果您有功能上的建议,可以提到 FeatHub

使用上的问题,欢迎在「Taro 社区」一起交流

@taro-bot
Copy link

taro-bot bot commented May 6, 2020

CC @Chen-jj

@taro-bot
Copy link

taro-bot bot commented May 6, 2020

欢迎提交 Issue~

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

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

Good luck and happy coding~

luckyadam added a commit that referenced this issue May 13, 2020
## 特性
- 添加 mdns 相关 api,close #6258

## 修复
- 修复使用 sass 打包项目时多端样式失效的问题,close #6218 
- 修复 css-loader 升级到 3.0.0 后带来 breaking change 问题,close #6191
- 修复对头条、京东小程序的原生样式编译的支持,close #6242
- 修复 service 和 helper 类型缺失问题
- 修复 H5 tabbar 跳转问题
- 修复 App 的 config 为静态属性时获取不到 config 对象的问题
- 修复 modifyWebpackChain 可能失效的问题
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

2 participants