danvk / source-map-explorer

Analyze and debug space usage through source maps
Apache License 2.0
3.82k stars 100 forks source link

Typescript importing broken? #139

Closed ersimont closed 4 years ago

ersimont commented 4 years ago

Description I upgraded to 2.0.1 and was met with the following error when trying to import explore:

Could not find a declaration file for module 'source-map-explorer'.

I can temporarily fix the problem by directly editing the package.json file in my node_modules folder, adding

  "types": "dist/src/index.d.ts",

This, of course, is a hacky workaround.

Steps to reproduce

  1. Try to import something from this library in a typescript file. (Not sure if there's anything trickier to it than that.)

Files to reproduce :(

Expected behavior No error from Typescript.

Environment

Additional context :(