Vue 不是构造函数 [英] Vue is not a constructor
本文介绍了Vue 不是构造函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用 webpack
,在 chrome 中构建并运行后显示此错误,我不知道如何解决.
I using webpack
, after build and run in chrome show this error,I don't know how to solve it.
我的代码很简单:
{
"devDependencies": {
"babel-core": "^6.23.1",
"babel-loader": "^6.3.2",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-es2015": "^6.22.0",
"babel-runtime": "5",
"css-loader": "^0.26.1",
"html-webpack-plugin": "^2.28.0",
"vue-hot-reload-api": "^2.0.9",
"vue-html-loader": "^1.2.3",
"vue-loader": "10.0.3",
"vue-style-loader": "^2.0.0",
"vue-template-compiler": "^2.1.10",
"webpack": "^2.2.1",
"webpack-dev-server": "^2.4.1"
},
"dependencies": {
"vue": "^2.1.10"
}
}
推荐答案
Vue 是该库的默认导出,因此您可以像这样导入.
Vue is the default export from that library so you import like this.
import Vue from 'vue'
这篇关于Vue 不是构造函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文