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
错误如上:
原因:
同时配置了:
关闭eslint
elsint修复:
解决删除其中任意一个配置,或者将lintOnsave:false,改为 lintOnsave:“error”