Skip to content

Conversation

@andrewkchan
Copy link
Contributor

@andrewkchan andrewkchan commented Oct 16, 2025

source-map is a CommonJS module, and since Node v14.13, when importing a CommonJS module from an ECMAScript Module, the CommonJS named exports are added to a default namespace.

Verified fix by:

  1. Drag in the sample/profiles/source-maps/chrome-85-esbuild.json
  2. Then drag in the sample/profiles/source-maps/esbuild/typescript-source-map-test.js.map

Before, it gives "Unrecognized format" error, after, it remaps the files to alpha.ts, gamma.ts, etc. Tested on Node v22.14.0.

@coveralls
Copy link

Coverage Status

coverage: 43.602%. remained the same
when pulling 9a37858 on andrewkchan:main
into e5786f9 on jlfwong:main.

@jlfwong jlfwong merged commit f1d27ac into jlfwong:main Oct 16, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants