webpack 加载vue组件webpack You are using the runtime-only build of Vue where the template compiler is no
场景. webpack 加载vue进行开发的时候, 曝出这样错误webpack You are using the runtime-only build of Vue where the template compiler is not available. webpack的配置情况是{test : /\.vue$/...
·
场景
. webpack 加载vue进行开发的时候, 曝出这样错误
webpack You are using the runtime-only build of Vue where the template compiler is not available
. webpack的配置情况是
{
test : /\.vue$/,
use : [
{
loader : 'vue-loader'
}
]
}
. entry文件的加载方式是
import Vue from 'vue';
import Heading from './components/heading.vue';
new Vue({
el : '#app',
components : {
Heading
}
});
解决
. webopack.config.js 增加如下配置
resolve: {
alias: {
vue: 'vue/dist/vue.js'
}
}
更多推荐
已为社区贡献24条内容
所有评论(0)