jimmy163
jimmy163
  • 发布:2020-03-02 17:15
  • 更新:2020-03-02 17:24
  • 阅读:972

自定义环境, test

分类:uni-app
  1. 增加脚本
    "test:mp-weixin": "cross-env NODE_ENV=test UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch"
  2. 点击
    'yarn test:mp-weixin'
  3. 查看
ERROR  WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.  
 - configuration.mode should be one of these:  
   "development" | "production" | "none"  
   -> Enable production optimizations or development hints.  
WebpackOptionsValidationError: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.  
 - configuration.mode should be one of these:  
   "development" | "production" | "none"  
   -> Enable production optimizations or development hints.  
    at webpack (/Users/jimmy/MiniProjects/uni-cli-ts/node_modules/webpack/lib/webpack.js:31:9)  
    at serve (/Users/jimmy/MiniProjects/uni-cli-ts/node_modules/@dcloudio/vue-cli-plugin-uni/commands/serve.js:135:22)  
    at processTicksAndRejections (internal/process/task_queues.js:93:5)  
error Command failed with exit code 1.  
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
2020-03-02 17:15 负责人:无 分享
已邀请:
DCloud_UNI_FXY

DCloud_UNI_FXY

https://github.com/dcloudio/uni-app/issues/1368

该问题目前已经被锁定, 无法添加新回复