-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix built-in node modules static imports (#268)
* allow any node built-in module to run correctly * add changeset
- Loading branch information
1 parent
fd51777
commit 81bfcdb
Showing
2 changed files
with
37 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
'@cloudflare/next-on-pages': patch | ||
--- | ||
|
||
allow any node built-in module to be statically imported correctly | ||
|
||
currently only static imports from "node:buffer" work correctly, other | ||
imports, although supported by the workers runtime, aren't handled correctly | ||
(such as "node:events" and "node:util"), fix this by making sure we handle | ||
imports from any of the node built-in modules | ||
|
||
> **Note** | ||
> some node built-in modules supported by the workers runtime still cannot be | ||
> correctly imported (like "node:path" for example), but this is because they | ||
> seem to be not allowed by vercel/next itself (so it's something unrelated to | ||
> next-on-pages) |
This file contains 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