You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had to increase the Node minimum support for this PR to work. Currently, sirv supported Node10+ but and node: was only added in Node 16 and back-ported to Node 14.18
The sibling Polka PR worked because the polka@next already had an exports map, which allowed/guaranteed anyone using ESM to get the node:-containing files, but all legacy/previous CommonJS usage to keep using files that did not have node: in it, which quickly broke many upstream CommonJS users.
This wasnt an option here, as sirv did not already have an exports map, so I couldnt guarantee that ESM users would get the new node: files (thus making this PR useless).
Why? The index.js files were built into build.mjs and build.js outputs. A build script could strip node:-prefixes in build.js (like the Polka PR), leaving them in build.mjs... but since sirv only has "module" mapping, which is now largely ignore/replaced by exports, it's unlikely that Svelte Kit / Deno users would ever see the build.mjs file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the
node:prefix to Node's modules for compatibility with Deno.