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'

修改時參考博客
報錯參考


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM