我想动态渲染特定组件,因此将其定义为异步组件,如下所示:
Vue.component('AsyncComponent', function (resolve) {
require(['./components/async-component.vue'], resolve)
});
但是得到这个错误
错误:加载块 0 失败。在 HTMLScriptElement.onScriptComplete (app.js:99)
所以主要的问题是块文件的路径没有在任何地方指定,抛出404错误,是否还有任何webpack配置,我需要指定。提前谢谢你。