-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[6.2 RC1] gulp-uglify gets hung up on backticks #8241
Comments
Are you running it through |
Indeed. I added the full task to the original post. |
Do you have a {
"presets": ["es2015"]
} |
That fixed it. However, I went a slightly different route. It looks like you can setup your Babel config right in the Gulp file. Here is what I went with: .pipe(babel({
presets: ['es2015']
})) |
Yeah, Babel 6's thing is that it doesn't transform any code by default—you have to tell it what transforms you want to use. |
This is IMHO unrelated to ES6 – uglify chokes on backticks across the board. Would it be okay to replace those backticks generally with apostrophes? From a coding style consistency perspective, this would be preferable. I'd be happy to create a PR if chances are for it to get accepted. |
@matzner - the backticks are related to ES6. |
Thanks for the hint, @JeremyEnglert. I ran across the issue when building a Foundation 6.2 project, when using the sources in a RequireJS setup, and then minifying the built file using uglifyjs2. This used to work up until Foundation 6.1 – now the build process breaks with 6.2 |
Most likely related to this: #8255 |
Obviously, when installing 6.2 with a package manager and using a build process, it now is necessary to transpile the code first, which is not an issue per se, just a change we need to be aware of and change the build process accordingly |
The error is referencing line 56, which is:
It looks like gulp-uglify is getting hung up whenever a ` (backtick) is used.
Is anyone else noticing this?
Here is my Gulpfile.js
The text was updated successfully, but these errors were encountered: