Vuejs lazy loading error. components used are a web-components this I uploaded through npm

本小妞迷上赌 提交于 2019-12-11 05:43:29

问题


The vuejs common components which I created as a web-component and uploaded to npm doesn't work when I installed it to a different file. I think it's because of lazy-loading. I tried searching some fixes but I can't find that fixed my problem.

On chrome and firefox error images are provided


I am using this code on importing the components inside web-components.

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

Error on chrome:

[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)



Error on 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)

来源:https://stackoverflow.com/questions/57234533/vuejs-lazy-loading-error-components-used-are-a-web-components-this-i-uploaded-t

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!