We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
babel
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
Hello,
Recently I've been having troubles minifying spreads in arrays, after being transpiled using Babel (using babel-preset-env).
The following code
let a = [...document.body.children] console.log(a)
becomes, after transpiling and minifying, the following:
var a=[babelHelpers.toConsumableArray(document.body.children)];console.log(a);
Notice how the babelHelpers.toConsumableArray is called inside another array. The result is an array within an array.
babelHelpers.toConsumableArray
To reproduce, the package.json:
{ "name": "babili-test", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "build": "babel index.js -o index.min.js" }, "author": "", "license": "ISC", "devDependencies": { "babel-cli": "^6.24.1", "babel-core": "^6.25.0", "babel-plugin-external-helpers": "^6.22.0", "babel-polyfill": "^6.23.0", "babel-preset-babili": "^0.1.3", "babel-preset-env": "^1.5.2" } }
And the .babelrc:
{ "presets": [ ["env", { "targets": { "ie": "11", "ios": "7", "android": "4.4" }, "modules": false, "useBuiltIns": true }], "babili" ], "plugins": [ "external-helpers" ] }
I'd like to point out that, when you remove "babili" from the .babelrc, the code is transpiled correctly.
If I'm overlooking something incredibly obvious, please let me know. 😄
The text was updated successfully, but these errors were encountered:
You’ve got the same issue as #580. The issue has been fixed on master, and the maintainers said they’d do a release today.
master
Sorry, something went wrong.
Well, there you go. Thanks for the heads up! Sorry for the 'duplicate' issue.
No branches or pull requests
Hello,
Recently I've been having troubles minifying spreads in arrays, after being transpiled using Babel (using babel-preset-env).
The following code
becomes, after transpiling and minifying, the following:
Notice how the
babelHelpers.toConsumableArray
is called inside another array. The result is an array within an array.To reproduce, the package.json:
And the .babelrc:
I'd like to point out that, when you remove "babili" from the .babelrc, the code is transpiled correctly.
If I'm overlooking something incredibly obvious, please let me know. 😄
The text was updated successfully, but these errors were encountered: