-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Node built-in modules support for Deno adapter (#7288)
* feature(deno adapter): allow built-in node modules * Add changeset * format
- Loading branch information
Showing
5 changed files
with
94 additions
and
4 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,5 @@ | ||
--- | ||
'@astrojs/deno': minor | ||
--- | ||
|
||
The deno adapter now supports npm package that require built-in node modules. |
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
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
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
15 changes: 15 additions & 0 deletions
15
packages/integrations/deno/test/fixtures/basics/src/pages/nodecompat.astro
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,15 @@ | ||
--- | ||
// unprefixed node built-in module | ||
import path from 'path' | ||
// prefixed node built-in module | ||
import os from 'node:os' | ||
--- | ||
<body> | ||
<a href={path.posix.basename('/public/myfile.html')}>Go to my file</a> | ||
<details> | ||
<summary>CPU Architecture</summary> | ||
<code>{os.arch()}</code> | ||
</details> | ||
<p>Everything went fine.</p> | ||
</body> |