Skip to content

esm: unflag import.meta.resolve#49028

Merged
nodejs-github-bot merged 8 commits intonodejs:mainfrom
guybedford:import-meta-resolve-unflag
Aug 13, 2023
Merged

esm: unflag import.meta.resolve#49028
nodejs-github-bot merged 8 commits intonodejs:mainfrom
guybedford:import-meta-resolve-unflag

Conversation

@guybedford
Copy link
Copy Markdown
Contributor

@guybedford guybedford commented Aug 5, 2023

Unflags import.meta.resolve making the second parentURL argument still gated behind the same --experimental-import-meta-resolve flag so that existing users would retain backwards compatibility, while the default behaviour becomes standards compliant.

If we can combine this approach with supporting file:/// URLs in fetch, that would be a powerful new approach for cross-platform asset loading - await (await fetch(import.meta.resolve('./asset.bin'))).arrayBuffer() which hopefully in turn bundlers should also be able to support better too.

//cc @nodejs/modules

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. esm Issues and PRs related to the ECMAScript Modules implementation. notable-change PRs with changes that should be highlighted in changelogs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants