Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Commit 1bf9be8

Browse files
authored
Add support for import with node: (#1405)
This PR adds support for pkg to identify any built-in/core module that's being imported using the `node:` protocol. Fixes: #1309, #1363
1 parent b63df87 commit 1bf9be8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/walker.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,10 @@ class Walker {
846846
) {
847847
for (const derivative of derivatives) {
848848
if (natives[derivative.alias]) continue;
849-
849+
if (derivative.alias.startsWith('node:')) {
850+
if (natives[derivative.alias.substr(5)]) continue;
851+
}
852+
850853
switch (derivative.aliasType) {
851854
case ALIAS_AS_RELATIVE:
852855
await this.stepDerivatives_ALIAS_AS_RELATIVE(

0 commit comments

Comments
 (0)