Webpack运行报错

新手上路,请多包涵

npm run dev 运行报这个错是配置的哪里错了

Invalid configuration object\. Webpack has been initialised using a configuration object that does not match the API schema\.
\- configuration\[0\]\.entry should be one of these:
object \{ : non\-empty string \| \[non\-empty string\] \} \| non\-empty string \| \[non\-empty string\] \| function
The entry point\(s\) of the compilation\.
Details:
\* configuration\[0\]\.entry\['index/nav'\] should be a string\.
\* configuration\[0\]\.entry\['index/nav'\]\[2\] should be a string\.
\* configuration\[0\]\.entry\['index/nav'\] should be one of these:
non\-empty string \| \[non\-empty string\]
\* configuration\[0\]\.entry should be a string\.
\* configuration\[0\]\.entry should be an array:
\[non\-empty string\]
\* configuration\[0\]\.entry should be an instance of function
function returning an entry object or a promise\.\.
\#\#\# 题目描述

\#\#\# 题目来源及自己的思路

\#\#\# 相关代码
粘贴代码文本(请勿用截图)

\#\#\# 你期待的结果是什么?实际看到的错误信息又是什么?

阅读 2k
1 个回答

配置文件导出的对象无效,入口配置报错。建议看看 webpack 官网的入口文件配置

推荐问题