rax
rax copied to clipboard
[Question]如何不提示`[Config File] Config key 'xxx' is not supported`
背景
{
"targets": ["web"],
"wechat-miniprogram": {
"nativeConfig": {
"appid": "xxx"
}
}
}
会提示[Config File] Config key 'wechat-miniprogram' is not supported。
除非我加上targets加上wechat-miniprogram
然后我场景是
- 开发时候大部分是只有构建web,只有打包才会加上其他环境
- 现在的情况,我只够构建web的时候还得把其他环境的配置删掉
需求
- 这种场景如何不提示这种错误,或者提示后能否不中断构建
可以命令行指定需要调试的端,比如 npm start -- --dev-targets=web
可以命令行指定需要调试的端,比如 npm start -- --dev-targets=web
还是提示一样的错误