-
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
outputRoot: dist/${process.env.TARO_ENV}
无效
#4653
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
CC @luckyadam |
可以直接从构建命令获取环境变量,参照cross-env。
zoujunda@coship.com
发件人: Sankin Tan
发送时间: 2019-10-22 20:37
收件人: NervJS/taro
抄送: zoujunda; Author
主题: Re: [NervJS/taro] outputRoot: `dist/${process.env.TARO_ENV}` 无效 (#4653)
构建配置都还没有执行,此时环境变量还未植入node进程,应该是拿不到env的。你可以在index.js底部暴露的方法里获取env,然后把修改outputRoot值。。
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
已解决,是自己编译器默认yarn对应的taro cli和npm taro cli版本不一致导致 |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述
参照文档多端同步调试配置:outputRoot:
dist/${process.env.TARO_ENV}
,编译调试生成的目录为dist/undefined复现步骤
[复现问题的步骤]
dist/${process.env.TARO_ENV}
期望行为
达到文档效果
报错信息
系统信息
补充信息
[可选]
应该是config/index.js文件中process.env.TARO_ENV 为undefined导致
The text was updated successfully, but these errors were encountered: