File tree Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -1996,7 +1996,7 @@ async function bundleConfigFile(
1996
1996
// With the `isNodeBuiltin` check above, this check captures if the builtin is a
1997
1997
// non-node built-in, which esbuild doesn't know how to handle. In that case, we
1998
1998
// externalize it so the non-node runtime handles it instead.
1999
- if ( isNodeLikeBuiltin ( id ) ) {
1999
+ if ( isNodeLikeBuiltin ( id ) || id . startsWith ( 'npm:' ) ) {
2000
2000
return { external : true }
2001
2001
}
2002
2002
Original file line number Diff line number Diff line change @@ -98,8 +98,6 @@ export const normalizeId = (id: string): string =>
98
98
99
99
// Supported by Node, Deno, Bun
100
100
const NODE_BUILTIN_NAMESPACE = 'node:'
101
- // Supported by Deno
102
- const NPM_BUILTIN_NAMESPACE = 'npm:'
103
101
// Supported by Bun
104
102
const BUN_BUILTIN_NAMESPACE = 'bun:'
105
103
// Some runtimes like Bun injects namespaced modules here, which is not a node builtin
@@ -136,7 +134,6 @@ export function createIsBuiltin(
136
134
export const nodeLikeBuiltins = [
137
135
...nodeBuiltins ,
138
136
new RegExp ( `^${ NODE_BUILTIN_NAMESPACE } ` ) ,
139
- new RegExp ( `^${ NPM_BUILTIN_NAMESPACE } ` ) ,
140
137
new RegExp ( `^${ BUN_BUILTIN_NAMESPACE } ` ) ,
141
138
]
142
139
You can’t perform that action at this time.
0 commit comments