-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
默认的 babel 配置并不生效 #4033
Comments
删除缓存后再试一下?
我无法复现你说的这个问题 |
我开了个 repo 来复现:reproduction-vue-cli-babel-bug 可以看 |
然后我改掉 babel.config.js,重新跑了一遍 |
哦哦,明白了,你的意思是默认配置就该这样 |
为什么要这样设置?默认的 polyfill 是根据 browserslist 配置来添加的。默认是
所以如果用了 Number 的话会自动添加 Number polyfill,这是 |
@sodatea 但 Node 端应该使用单独打包,不应该与浏览器打包的 babel config 一致 我应该直接导出组件本身供外部引用,而不仅仅是打包后的组件 |
@sodatea
|
Version
3.7.0
Reproduction link
https://github.com/vuejs/vue-cli
Environment info
Steps to reproduce
run
vue create test-babel
create a projectchang
app.vue
:change
package.json
add build script:run
npm run build:vue-cli
see output file:
dist/test.umd.js
search
number
, you will see the number polyfillnow, change
babel.config.js
:rebuild output file and search number, the polyfill clean
What is expected?
babel.config.js can work
What is actually happening?
babel.config.js not work
导致 Node 端把组件加入到 externals 里之后内存泄漏
The text was updated successfully, but these errors were encountered: