Skip to content
This repository has been archived by the owner on Feb 3, 2020. It is now read-only.

babel-runtime #25

Open
transtone opened this issue May 11, 2016 · 2 comments
Open

babel-runtime #25

transtone opened this issue May 11, 2016 · 2 comments

Comments

@transtone
Copy link

transtone commented May 11, 2016

请问为何不能加入babel-runtime,加入之后会提示: Uncaught SyntaxError: Unexpected token import

全局使用: require('es6-promise').polyfill() 是不报错的。

大仙是否可以解答一下?谢谢

@ryli
Copy link

ryli commented May 11, 2016

The Babel docs describe this pretty concisely:

Babel includes a polyfill that includes a custom regenerator runtime and core.js.

This will emulate a full ES6 environment. This polyfill is automatically loaded when using babel-node and babel/register.

via:link

@transtone
Copy link
Author

transtone commented May 11, 2016

谢谢解答,这里也介绍了两种方法的不同:https://www.zfanw.com/blog/babel-6.html#babel-runtime

没弄明白的是为啥用 babel-runtime 会出错。是加入了 vue-antd 组件之后出错的,移除 vue-antd 组件之后正常。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants