diff --git a/packages/vite/src/node/plugins/resolve.ts b/packages/vite/src/node/plugins/resolve.ts index c47bf717a221d7..ec25852f96bbc6 100644 --- a/packages/vite/src/node/plugins/resolve.ts +++ b/packages/vite/src/node/plugins/resolve.ts @@ -33,7 +33,7 @@ function resolveExports( ) { return _resolveExports(pkg, key, { browser: true, - conditions: isProduction ? ['production'] : ['development'] + conditions: ['module', isProduction ? 'production' : 'development'] }) }