ERROR  ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
         - configuration.devtool should match pattern "^(inline-|hidden-|eval-)?(nosources-)?(cheap-(module-)?)?source-map$".
           BREAKING CHANGE since webpack 5: The devtool option is more strict.
           Please strictly follow the order of the keywords in the pattern.
ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
 - configuration.devtool should match pattern "^(inline-|hidden-|eval-)?(nosources-)?(cheap-(module-)?)?source-map$".
   BREAKING CHANGE since webpack 5: The devtool option is more strict.
   Please strictly follow the order of the keywords in the pattern.
    at validate (D:\代码练习\test\reggie_client\node_modules\webpack\node_modules\schema-utils\dist\validate.js:105:11)
    at validateSchema (D:\代码练习\test\reggie_client\node_modules\webpack\lib\validateSchema.js:78:2)
    at create (D:\代码练习\test\reggie_client\node_modules\webpack\lib\webpack.js:111:24)
    at webpack (D:\代码练习\test\reggie_client\node_modules\webpack\lib\webpack.js:158:32)
    at f (D:\代码练习\test\reggie_client\node_modules\webpack\lib\index.js:64:16)
    at serve (D:\代码练习\test\reggie_client\node_modules\@vue\cli-service\lib\commands\serve.js:185:22)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

将vue.config.js中的configureWebpack去掉即可

 

Logo

基于 Vue 的企业级 UI 组件库和中后台系统解决方案,为数万开发者服务。

更多推荐