-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
#ifdef 的条件编译不生效,在taro 4.0.8版本 #17220
Comments
This was referenced Jan 25, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
相关平台
H5
复现仓库
https://gitee.com/zhengjinpeng/temp_taro.git
浏览器版本: Microsoft Edge 版本 132.0.2957.115 (正式版本) (64 位)
使用框架: React
复现步骤
taro init 项目,选择 react-native 。
然后修改首页内容添加条件编译的console.log
运行yarn dev:h5 , 发现 rn 和h5两行代码都执行了
期望结果
只执行#ifdef对应环境的代码
实际结果
全部环境都执行了,没有区分开
环境信息
The text was updated successfully, but these errors were encountered: