wendux/neat

整合VUE2.0时会报错

shuanger051 opened this issue · 4 comments

import $ from 'neat-js'
这样之后,会报:
neat.js?031f:4Uncaught SyntaxError: Unexpected token import

错误在这一行
import {$} from "./core/core"

neat-js代码使用es6,需要添加babel依赖 "babel-core": "^6.14.0", "babel-loader": "^6.2.5", "babel-preset-es2015": "^6.14.0",

我试试,不过这个编译器大概有多大?多少KB?

我检查了下我的package.JSON文件 ,这些依赖我都已经加过了,在整合VUE2.0的时候。只不过,我的是6.0.0的版本有什么影响不?

我按你说的,写了一个demo, examples/commonJsTest.html、test.js ,并没有出现你说的问题,你可以重新pull一下或者npm安装最新的neat-js包试试。