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

不同的端构建不同的目录 dist-wechat、/dist-alipay、/dist-swan #1066

Closed
bluefox1688 opened this issue Nov 10, 2018 · 11 comments
Closed
Assignees

Comments

@bluefox1688
Copy link

能否为不同的端构建不同的目录,例如 /dist-wechat、/dist-alipay、/dist-swan,且 watch 文件变化进行热更新。
这种特别适合多端同时调试

@tourze
Copy link
Contributor

tourze commented Nov 11, 2018

+1

@luckyadam
Copy link
Member

已有相关计划~

@luckyadam luckyadam added the CLI label Nov 12, 2018
@luckyadam luckyadam self-assigned this Nov 12, 2018
@strawferry
Copy link

可以自己在 config/index.js 文件里稍微这样修改,暂且能用,哈哈哈
let outputRoot = "dist";

if(process.env.npm_config_argv.indexOf("h5") > 0){
outputRoot = "dist_h5";
}else if(process.env.npm_config_argv.indexOf("weapp") > 0){
outputRoot = "dist_we";
}else if(process.env.npm_config_argv.indexOf("swan") > 0){
outputRoot = "dist_swan";
}else if(process.env.npm_config_argv.indexOf("alipay") > 0){
outputRoot = "dist_al";
}

const config = {
outputRoot: outputRoot,
}

@Garfield550
Copy link
Collaborator

1.3.0-beta.5 已经支持 #2947 (comment)

@luckyadam 老李,这个可以关闭了。

@cncolder
Copy link
Contributor

cncolder commented Jun 5, 2019

@Garfield550 你说反了, 是原本支持, 在 1.3.0-beta.5 中又移除了.

b9b749f

@Garfield550
Copy link
Collaborator

@Garfield550 你说反了, 是原本支持, 在 1.3.0-beta.5 中又移除了.

b9b749f

1.3.5-beta.5 开始恢复之前的编译操作,文件会直接编译到 config 中配置的 outputRoot 目录下,如果需要多端同时调试,可以修改配置为

outputRoot: `dist/${process.env.TARO_ENV}`

@Garfield550
Copy link
Collaborator

image
我难不成还能骗你们吗

@cncolder
Copy link
Contributor

cncolder commented Jun 6, 2019

是我理解反了.

1.3.0-beta.4 会自动编译到各端目录下, 无需配置.

@Garfield550
Copy link
Collaborator

是我理解反了.

1.3.0-beta.4 会自动编译到各端目录下, 无需配置.

老李发 beta 5 的那天,在挨个群里通知了一下,因为有人不知道 beta 4 的改动,说编译失败。

@shenghanqin
Copy link
Collaborator

@bluefox1688 我理解的是最新版本可以支持这个特性的,请尝试。

@taro-bot
Copy link

taro-bot bot commented Dec 8, 2019

Hello~

您的问题楼上已经有了确切的回答,如果没有更多的问题这个 issue 将在 15 天后被自动关闭。

如果您在这 15 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。

Good luck and happy coding~

@taro-bot taro-bot bot removed the to be closed label Dec 23, 2019
@taro-bot taro-bot bot closed this as completed Dec 23, 2019
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

7 participants