原來(lái)使用vue-cli寫(xiě)項(xiàng)目,寫(xiě)了個(gè)原生js的demo,在引入時(shí)發(fā)生報(bào)錯(cuò)暴露方式var uploadPath = 'hello world!';export {uploadPath}引入方式<script type="text/javascript">
import {uploadPath} from "../../common/js/global";</script>報(bào)錯(cuò)如果說(shuō)是無(wú)法識(shí)別ES6的話應(yīng)該是 import報(bào)錯(cuò),而且vue-cli應(yīng)該已經(jīng)配置過(guò)webpack了。請(qǐng)教各位這是什么問(wèn)題?
原生js使用es6 import引入報(bào)錯(cuò)
慕工程0101907
2018-12-11 21:46:33