Vuejs懒加载错误。 使用的组件是一个网页组件通过NPM上传这个我(Vuejs lazy lo

2019-09-28 00:08发布

这是我作为一个网络组件创建并上传到故宫的vuejs通用组件当我把它安装到不同的文件不起作用。 我想这是因为懒加载的。 我试图寻找一些修正,但我无法找到固定我的问题。

在Chrome和Firefox错误图像提供


我使用的进口网络组件内部的组件的代码。

components: {
    'data-description-c': () => import(/* webpackChunkName: "data-description-c" */ './myPage/DataDescriptionC.vue'),
    'data-count-c': () => import(/* webpackChunkName: "data-count-c" */'./myPage/DataCountC.vue')
  },

错误对铬:

[Vue warn]: Failed to resolve async component: function data_description_c() { return __webpack_require__.e(/* import() | data-description-c */ 3).then(__webpack_require__.bind(null, "dffc")); } Reason: Error: Loading chunk 3 failed. (missing: http://localhost:8080/idist-components.common.data-description-c.js)

[Vue warn]: Failed to resolve async component: function data_count_c() { return __webpack_require__.e(/* import() | data-count-c */ 2).then(__webpack_require__.bind(null, "755f")); } Reason: Error: Loading chunk 2 failed. (missing: http://localhost:8080/idist-components.common.data-count-c.js)



错误在Firefox:

[Vue warn]: Failed to resolve async component: function data_description_c() { return __webpack_require__.e(/* import() | data-description-c */ 3).then(__webpack_require__.bind(null, "dffc")); } Reason: Error: Loading chunk 3 failed. (missing: http://localhost:8080/idist-components.common.data-description-c.js)

[Vue warn]: Failed to resolve async component: function data_count_c() { return __webpack_require__.e(/* import() | data-count-c */ 2).then(__webpack_require__.bind(null, "755f")); } Reason: Error: Loading chunk 2 failed. (missing: http://localhost:8080/idist-components.common.data-count-c.js)

文章来源: Vuejs lazy loading error. components used are a web-components this I uploaded through npm