rax icon indicating copy to clipboard operation
rax copied to clipboard

[Question]如何不提示`[Config File] Config key 'xxx' is not supported`

Open xmsz opened this issue 3 years ago • 2 comments

背景

{
  "targets": ["web"],
  "wechat-miniprogram": {
    "nativeConfig": {
      "appid": "xxx"
    }
  }
}

会提示[Config File] Config key 'wechat-miniprogram' is not supported

除非我加上targets加上wechat-miniprogram

然后我场景是

  • 开发时候大部分是只有构建web,只有打包才会加上其他环境
  • 现在的情况,我只够构建web的时候还得把其他环境的配置删掉

需求

  • 这种场景如何不提示这种错误,或者提示后能否不中断构建

xmsz avatar Apr 14 '22 05:04 xmsz

可以命令行指定需要调试的端,比如 npm start -- --dev-targets=web

SoloJiang avatar May 15 '22 14:05 SoloJiang

可以命令行指定需要调试的端,比如 npm start -- --dev-targets=web

image

还是提示一样的错误

xmsz avatar May 16 '22 03:05 xmsz