-
Notifications
You must be signed in to change notification settings - Fork 799
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
update rollup etc. and install the latest (transpiled) @terraformer/arcgis #1201
Conversation
@@ -26,7 +29,8 @@ export default { | |||
name: 'L.esri', | |||
globals: { | |||
'leaflet': 'L', | |||
'esri-leaflet': 'L.esri' | |||
'esri-leaflet': 'L.esri', | |||
'@terraformer/arcgis': 'Terraformer' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this solves an unrelated rollup nag.
Use output.globals to specify browser global variable names corresponding to external modules
/Users/john/code/ezree/esri-leaflet/node_modules/rollup/dist/rollup.js (guessing 'arcgis')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this locally, seems to work and also works in IE11.
Personally my preference would be to not transpile Esri Leaflet at all and resolve this in |
i've been considering it a feature that @terraformer/arcgis ships both a UMD and a flat ESM module that can be tree shaken by consumers like Esri Leaflet. i've never considered shipping a pre-transpiled ESM before, but i will make it so. |
alright, i just pushed another commit to revert the new babel 🤸 step here. what's left
sorry this turned into a dogfooding session, but i appreciate you helping me improve terraformer@latest! i don't have access to a box to test IE11 anymore, so help on that front would be appreciated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I tested on IE11, works fine.
update rollup etc. and install the latest (transpiled) @terraformer/arcgis
update rollup etc. and install the latest (transpiled) @terraformer/arcgis
thank you @destus90 for pointing out the problem with #1194. the error they saw in IE11 would have been caught out at compilation time if we had been running a newer version of rollup to bundle the library.
this PR is an alternative to #1199 that bumps @terraformer/arcgis to a version that is already transpiled and also updates rollup and its plugins to more modern versions so we don't miss similar errors in the future.
as you can see from the error, its only
uglify()
that was complaining about the ES2015 syntax. that's why @destus90 targeted the production build specifically.either way, i feel bad for introducing that bug 🐛. i forgot that i'd sprinkled a little extra ES sugar when i ported arcgis-to-geojson-utils.
the good thing about @destus90's fix (and this one) is that they set you up to start using some more modern JS in this library and have it transpiled down for older browsers too if you ever feel like it.i opened up this PR to get a little bit closer to the root of the problem, but also because i thought it would uncover the error to described in #1200.
i was only successful on the first front.