Record: Problem caused by eslint configuration error in vue.config.js Child compilation failed:

Error: Child compilation failed:
 Module parse failed: Unexpected token (1:0)
 File was processed with these loaders:
  * ./node_modules/html-webpack-plugin/lib/loader.js
  * ./node_modules/eslint-loader/index.js
 You may need an additional loader to handle the result of these loaders.
 > <!DOCTYPE html>
 | <html lang="en">
 |   <head>:
 SyntaxError: Unexpected token (1:0)

 - compiler.js:79
   [web_vant]/[html-webpack-plugin]/lib/compiler.js:79:16

 - Compiler.js:343
   [web_vant]/[webpack]/lib/Compiler.js:343:11

 - Compiler.js:681
   [web_vant]/[webpack]/lib/Compiler.js:681:15


 - Hook.js:154 AsyncSeriesHook.lazyCompileHook
   [web_vant]/[tapable]/lib/Hook.js:154:20

 - Compiler.js:678
   [web_vant]/[webpack]/lib/Compiler.js:678:31


 - Hook.js:154 AsyncSeriesHook.lazyCompileHook
   [web_vant]/[tapable]/lib/Hook.js:154:20

 - Compilation.js:1423
   [web_vant]/[webpack]/lib/Compilation.js:1423:35


 - Hook.js:154 AsyncSeriesHook.lazyCompileHook
   [web_vant]/[tapable]/lib/Hook.js:154:20

 - Compilation.js:1414
   [web_vant]/[webpack]/lib/Compilation.js:1414:32


 - Hook.js:154 AsyncSeriesHook.lazyCompileHook
   [web_vant]/[tapable]/lib/Hook.js:154:20

 - Compilation.js:1409
   [web_vant]/[webpack]/lib/Compilation.js:1409:36

The error is as above:
Reason:
Configured at the same time:
Close eslint
Insert picture description here
elsint Repair:
Insert picture description here
Resolve to delete any of the configurations, or change lintOnsave: false to lintOnsave: "error"

Guess you like

Origin blog.csdn.net/weixin_39854011/article/details/112448148