Skip to content

Add WithSkipEmptySourceMaps parser option#680

Open
dsmith3197 wants to merge 1 commit into
dop251:masterfrom
dsmith3197:skip-empty-source-maps-parser-option
Open

Add WithSkipEmptySourceMaps parser option#680
dsmith3197 wants to merge 1 commit into
dop251:masterfrom
dsmith3197:skip-empty-source-maps-parser-option

Conversation

@dsmith3197

Copy link
Copy Markdown

The TypeScript compiler produces empty source map files for source files containing only type definitions.

This PR adds a WithSkipEmptySourceMaps parser option that ignores the empty source map error produced here.

@dop251

dop251 commented Oct 14, 2025

Copy link
Copy Markdown
Owner

I think the behaviour should be to simply ignore missing or invalid source maps. This will match nodejs and browsers.

@dsmith3197

Copy link
Copy Markdown
Author

I think the behaviour should be to simply ignore missing or invalid source maps. This will match nodejs and browsers.

Are you suggesting that we remove the option altogether and always ignore empty/invalid source maps? Or are you saying that when the option is enabled, we should ignore all errors when parsing the source map?

@dop251

dop251 commented Oct 15, 2025

Copy link
Copy Markdown
Owner

The former. Both nodejs and the browsers seem to behave this way.

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.

2 participants