Wildhoney / Leaflet.FreeDraw

:earth_asia: FreeDraw allows the free-hand drawing of shapes on your Leaflet.js map layer – providing an intuitive and familiar UX for creating geospatial boundaries similar to Zoopla and others. Included out-of-the-box is the concaving of polygons, polygon merging and simplifying, as well as the ability to add edges and modify existing shapes.
https://freedraw.herokuapp.com/
MIT License
544 stars 103 forks source link

ES6 Import trouble #163

Closed stell closed 4 years ago

stell commented 4 years ago

When installing via node or yarn i only get the dist folder. I need to integrate this as an ES6 import and let it transpile via buble.

ATM this is not possible and the dist code makes trouble in IE 11 because i can't transpile it. I get an error around the toStringTag Symbol.

This is a great library, but let us use it in ES6 imports.

Wildhoney commented 4 years ago

We don't have a .npmignore file so you should be getting the src directory as well. I've tested this myself and get almost all the files that the repo has.

import react-shadow/src not work for you, if you're after the uncompiled file?

stell commented 4 years ago

Thanks for answering. Don't know what's going wrong. Using npm or yarn makes no difference. yarn add leaflet-freedraw only creates the dist folder. srcfolder is missing.

stell commented 4 years ago

Could you please check your package.json? Looks like this is preventing to get the /src Folder:

{
  "files": [
    "dist"
  ],
}
Wildhoney commented 4 years ago

Sorry, I totally forgot about this issue @stell. Resolved with leaflet-freedraw@2.13.2.

Please let me know if it's all good for you now.

stell commented 4 years ago

Thank you. Problem solved.