From bc0cc672fb9c85d7e4221ed0a904b28935822ca3 Mon Sep 17 00:00:00 2001 From: sapphi-red <49056869+sapphi-red@users.noreply.github.com> Date: Mon, 25 Nov 2024 11:20:01 +0900 Subject: [PATCH] chore: fix for new vite resolve plugin --- packages/vite/src/node/plugins/resolve.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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,