henrythasler / Leaflet.Geodesic

Add-on to draw geodesic lines with leaflet
GNU General Public License v3.0
156 stars 27 forks source link

Failed to minify with create-react-app #31

Closed stephenhandley closed 6 years ago

stephenhandley commented 6 years ago

When using Leaflet.Geodesic as a dependency in a create-react-app application, I am seeing the following error:

Failed to minify
./node_modules/Leaflet.Geodesic/Leaflet.Geodesic.js:70 

Could you please publish an es5 compatible version as described here? https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-fails-to-minify

you could use webpack/babel to generate the code, but it doesn't look like you're using much non-es5 code and so it may just be a matter of replacing all let and const usage with var.

henrythasler commented 6 years ago

I just created an es5-branch. It also includes a minified version. Please check that out.

stephenhandley commented 6 years ago

awesome thanks! will check it out.

Azmisov commented 6 years ago

I've tested this out and it is working.

henrythasler commented 6 years ago

Thanks for the feedback

stephenhandley commented 6 years ago

Thanks @henrythasler and @Azmisov

cknakua commented 6 years ago

@henrythasler When do you plan on merging #34 (~Leaflet.Geodesic/pull/34) to ES5?

henrythasler commented 6 years ago

@cknakua I'm currently not inclined to support ES5 unless absolutely necessary.