webpack报错1:configuration.mode should be one of these: "development" | "production" | "none"

解决1:

报错如下

   × 「wds」: 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.

找到问题

configuration.mode should be one of these:
"development" | "production" | "none"

此处意思参数出现问题,回到代码中发现多了一个空格

mode: 'development'
//修改前mode: ' development'

修改时参考博客

报错参考