File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { getViteRollupConfig } from "./rollup";
8
8
import { buildProduction , prodEntry } from "./prod" ;
9
9
import { createNitroEnvironment , createServiceEnvironments } from "./env" ;
10
10
import { configureViteDevServer } from "./dev" ;
11
- import { runtimeDir } from "nitro/runtime/meta" ;
11
+ import { runtimeDependencies , runtimeDir } from "nitro/runtime/meta" ;
12
12
13
13
import * as rou3 from "rou3" ;
14
14
import * as rou3Compiler from "rou3/compiler" ;
@@ -168,6 +168,26 @@ export async function nitro(
168
168
return resolved ;
169
169
}
170
170
}
171
+
172
+ // Resolve built-in deps
173
+ if (
174
+ runtimeDependencies . some (
175
+ ( dep ) => id === dep || id . startsWith ( `${ dep } /` )
176
+ )
177
+ ) {
178
+ const resolved = await this . resolve ( id , importer , {
179
+ ...options ,
180
+ skipSelf : true ,
181
+ } ) ;
182
+ return (
183
+ resolved ||
184
+ resolveModulePath ( id , {
185
+ from : ctx . nitro ! . options . nodeModulesDirs ,
186
+ conditions : ctx . nitro ! . options . exportConditions ,
187
+ try : true ,
188
+ } )
189
+ ) ;
190
+ }
171
191
} ,
172
192
173
193
async load ( id ) {
You can’t perform that action at this time.
0 commit comments