File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -973,7 +973,6 @@ async function bundleConfigFile(
973
973
root : path . dirname ( fileName ) ,
974
974
isBuild : true ,
975
975
isProduction : true ,
976
- isRequire : ! isESM ,
977
976
preferRelative : false ,
978
977
tryIndex : true ,
979
978
mainFields : [ ] ,
@@ -1001,8 +1000,15 @@ async function bundleConfigFile(
1001
1000
if ( id . startsWith ( 'npm:' ) ) {
1002
1001
return { external : true }
1003
1002
}
1004
- let idFsPath = tryNodeResolve ( id , importer , options , false ) ?. id
1005
- if ( idFsPath && ( isESM || kind === 'dynamic-import' ) ) {
1003
+
1004
+ const isIdESM = isESM || kind === 'dynamic-import'
1005
+ let idFsPath = tryNodeResolve (
1006
+ id ,
1007
+ importer ,
1008
+ { ...options , isRequire : ! isIdESM } ,
1009
+ false ,
1010
+ ) ?. id
1011
+ if ( idFsPath && isIdESM ) {
1006
1012
idFsPath = pathToFileURL ( idFsPath ) . href
1007
1013
}
1008
1014
return {
You can’t perform that action at this time.
0 commit comments