构建 REACT 项目错误消息("index.html" 的入口点 html-webpack-plugin = index.html)



我无法使用npm run build构建我的react项目,因为我一直收到以下错误消息:

Child __offline_serviceworker:
1 asset
Entrypoint __offline_serviceworker = __offline_serviceworker
Child html-webpack-plugin for "index.html":
1 asset
Entrypoint html-webpack-plugin for "index.html" = index.html

我对构建react项目还很陌生,所以如果这是一个业余的问题,我很抱歉。我已经试过了:

  1. 我已经尝试通过遵循这个html webpack插件Entrypoint undefined=index.html来更改入口点,但它仍然没有起作用。

  2. 我也尝试过将webpack降级为3.07,但该解决方案也没有帮助。

  3. 我已经尝试了其他选项,包括终端中的npm i mishoo/UglifyJS2#harmony,如下所示:https://github.com/webpack/webpack-pwa/issues/7但仍然没有运气

我目前想不出任何其他解决方案,因此我决定在这里发布。

我的网络包位于:internals/webpack/webpack.prod.babel

我的index.html位于根文件夹中

在我的package.json中,我有如下的webpack:

"devDependencies": {
"html-webpack-plugin": "3.0.7",
...
}

我非常感谢帮助解决这个问题。提前感谢大家。

npm run build只有在package.json文件中指定了构建需要执行的操作时才能工作。但如果你的意图只是安装软件包(即第一步(;CCD_ 7";并运行代码run";CCD_ 8";

最新更新