diff --git a/packages/vite/src/node/plugins/resolve.ts b/packages/vite/src/node/plugins/resolve.ts index 9dd90fb5f82888..b6e376d2b0590b 100644 --- a/packages/vite/src/node/plugins/resolve.ts +++ b/packages/vite/src/node/plugins/resolve.ts @@ -238,10 +238,11 @@ export function oxcResolvePlugin( isProduction: options.isProduction, asSrc: options.asSrc ?? false, preferRelative: options.preferRelative ?? false, + isRequire: options.isRequire, root: options.root, scan: options.scan ?? false, - mainFields: options.mainFields, + mainFields: options.mainFields.concat(['main']), conditions: options.conditions, externalConditions: options.externalConditions, extensions: options.extensions,