node-source-map-support
node-source-map-support copied to clipboard
Provide esm version
With more and more build tools (vite, nuxt, etc) going towards an esm-first build, it would be nice if a proper esm interface could be provided, i.e. transpile and distribute esm version, including correct export declaration in package.json.
vote for pure ESM-only
Meanwhile could anyone show a workaround to use it with Vite/Rollup? Importing from 'source-map-support/browser-source-map-support.js' seems to be broken: TypeError: Cannot set properties of undefined (setting 'sourceMapSupport')
UPDATE: Nevermind, all I needed to do was:
import sourceMapSupport from 'source-map-support'
sourceMapSupport.install()
It works just fine with Vite.