Skip to content

fix: add explicit extensions to web-features#4151

Open
43081j wants to merge 1 commit into
web-platform-dx:mainfrom
43081j:jg/wf-types
Open

fix: add explicit extensions to web-features#4151
43081j wants to merge 1 commit into
web-platform-dx:mainfrom
43081j:jg/wf-types

Conversation

@43081j

@43081j 43081j commented Jul 3, 2026

Copy link
Copy Markdown

Importing web-features in a project which uses node16 resolution
currently fails since it can't resolve "./types". This means the types
we get are basically Record<string, any> rather than Record<string, FeatureData>.

Given that this package requires a node-like runtime (it imports node:fs),
I think it makes sense to set the module to node18 and the
moduleResolution to node16.

This should basically enforce things like file extensions, respecting export
maps, etc.

Importing `web-features` in a project which uses node16 resolution
currently fails since it can't resolve `"./types"`. This means the types
we get are basically `Record<string, any>` rather than `Record<string,
FeatureData>`.

Given that this package requires a node-like runtime (it imports `node:fs`),
I think it makes sense to set the `module` to `node18` and the
`moduleResolution` to `node16`.

This should basically enforce things like file extensions, respecting export
maps, etc.
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.

1 participant