You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello ! I'm using d3-geo-projection as part of a project built using browserify and babelify. In my code
I'm importing a projection form the module like so : import {geoKavrayskiy7} from 'd3-geo-projection'
And after going through browserify and babelify it runs fine. However, after trying to minify the resulting file with uglify, I ran into this error :
Parse error at ..../app.browserify.browserified.js:13739,35
if (step === 180) c = c.map(d => [d[0] * (1 - epsilon), d[1]]);
^
ERROR: Unexpected token: operator (>)
What happens here is that the d3-geo-projection module doesn't go through babelify before being imported .I'm guessing the projection I'm importing from the module doesn't use this function since no error is thrown in the browser. However uglify sees it and gets angry. I can probably fix that by including the module in the babelify transform.
So I guess my question is : Is it normal to have bits of ES6 syntax in a module distributed through npm ?
The text was updated successfully, but these errors were encountered:
This is a bug introduced by @Fil in 942cb77. This repository shouldn’t currently ship ES6 syntax, but we will likely be switching to ES6+ syntax in the next major release, at which point you’ll need to update your toolchain or environment accordingly.
Hello ! I'm using d3-geo-projection as part of a project built using browserify and babelify. In my code
I'm importing a projection form the module like so :
import {geoKavrayskiy7} from 'd3-geo-projection'
And after going through browserify and babelify it runs fine. However, after trying to minify the resulting file with uglify, I ran into this error :
Which comes from the
sphere
function :What happens here is that the
d3-geo-projection
module doesn't go throughbabelify
before being imported .I'm guessing the projection I'm importing from the module doesn't use this function since no error is thrown in the browser. However uglify sees it and gets angry. I can probably fix that by including the module in the babelify transform.So I guess my question is : Is it normal to have bits of ES6 syntax in a module distributed through npm ?
The text was updated successfully, but these errors were encountered: