我按照官网给的方法,跟着一步步配置的,最后提示如下:
Uncaught ReferenceError: iView is not defined
at eval (main.js?1c90:10) at Object../src/main.js (app.js:1320) at __webpack_require__ (app.js:679) at fn (app.js:89) at Object.0 (app.js:1353) at __webpack_require__ (app.js:679) at app.js:725at app.js:728
我的配置是:
main.js文件中
import iView from 'iview';
import 'iView/dist/styles/iview.css';
Vue.use(iView);
.babelrc文件中
"plugins": [["import", {
"libraryName": "iview","libraryDirectory": "src/components"
}],"transform-vue-jsx", "transform-runtime"]
package.json文件中已经存在了需要安装的插件跟库,如下:
"iview": "^3.2.2",
"babel-plugin-import": "^1.11.0",
这就是我现在的问题,求大神指点。万分感谢
繁花不似锦
慕斯709654
相关分类