calvinmetcalf / shapefile-js

Convert a Shapefile to GeoJSON. Not many caveats.
http://calvinmetcalf.github.io/shapefile-js/
MIT License
735 stars 230 forks source link

Use `export default` in binaryajax-fetch.js #132

Closed lnedialkov closed 4 years ago

lnedialkov commented 4 years ago

Fixing Uncaught TypeError: Cannot assign to read only property 'exports' of object '[object Object]' in Angular 10

bishrant commented 4 years ago

I was facing the same issue while using shpjs in Typescript. It would be great if the author could merge this pull request.

calvinmetcalf commented 4 years ago

this library uses commonjs modules everywhere, note the require on the line above your change, I don't understand what you are trying to do here

calvinmetcalf commented 4 years ago

from the other thing you just need to do import * as shapefile from 'shpjs';