We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
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
[vue] vue-cli生成的项目可以使用es6、es7的语法吗?为什么?
The text was updated successfully, but these errors were encountered:
首先说结论, 有些可以直接使用, 有些不行
根据vue-cli 3.0的配置, 如果webpack能检测到, 它会自动把垫片自动打包到vendor中, 但是有些特性它检测不出来, 如es6.promise, 等
详细请查看vue-cli 3.0 Polyfill
Sorry, something went wrong.
vue-cli 配置了babel,可以将es6,es7....etc在webpack打包的时候转换成es5的代码,所以上线的时候没有问题。但是脚手架只是配置了一些默认常见的用法, 可以根据babel官网配置一些尚在草案中的语法
首先说结论, 有些可以直接使用, 有些不行 根据vue-cli 3.0的配置, 如果webpack能检测到, 它会自动把垫片自动打包到vendor中, 但是有些特性它检测不出来, 如es6.promise, 等 详细请查看vue-cli 3.0 Polyfill
那为什么我用promise没啥事,vue-cli3
vue-cli 创建的项目配置了babel,可以将es6,es7....etc在webpack打包的时候转换成es5的代码,所以b并不会出现问题。
No branches or pull requests
[vue] vue-cli生成的项目可以使用es6、es7的语法吗?为什么?
The text was updated successfully, but these errors were encountered: