【发布时间】:2021-01-27 14:07:01
【问题描述】:
我正在尝试在 IIS 上部署一个 app,它使用使用 ngx-build-plus 自定义构建器构建的 webpack5 模块联合,其中 extraWebpackConfig file 在angular.json 中定义。应用程序开始正常加载并获得 favicon 但随后导致错误:
Unhandled Promise rejection: Loading chunk 203 failed.
(error: http://localhost:4200/203.f429868b020a9d24d2de.js) ; Zone: <root> ; Task: Promise.then ; Value: ChunkLoadError: Loading chunk 203 failed.
(error: http://localhost:4200/203.f429868b020a9d24d2de.js)
at Object.j.f.j (http://localhost/webpack5-test/main.cbf4c029cfb79ab77242.js:1:6321)
at http://localhost/webpack5-test/main.cbf4c029cfb79ab77242.js:1:485
at Array.reduce (<anonymous>)
at Function.j.e (http://localhost/webpack5-test/main.cbf4c029cfb79ab77242.js:1:451)
at http://localhost/webpack5-test/main.cbf4c029cfb79ab77242.js:1:6874
at http://localhost/webpack5-test/main.cbf4c029cfb79ab77242.js:1:6930 ChunkLoadError: Loading chunk 203 failed.
(error: http://localhost:4200/203.f429868b020a9d24d2de.js)
at Object.j.f.j (http://localhost/webpack5-test/main.cbf4c029cfb79ab77242.js:1:6321)
at http://localhost/webpack5-test/main.cbf4c029cfb79ab77242.js:1:485
at Array.reduce (<anonymous>)
at Function.j.e (http://localhost/webpack5-test/main.cbf4c029cfb79ab77242.js:1:451)
at http://localhost/webpack5-test/main.cbf4c029cfb79ab77242.js:1:6874
at http://localhost/webpack5-test/main.cbf4c029cfb79ab77242.js:1:6930
如何在 IIS 上成功部署应用?
【问题讨论】:
标签: angular iis webpack deployment webpack-5