Skip to content

Commit

Permalink
fix: also resolve for module condition
Browse files Browse the repository at this point in the history
because tslib uses it to differentiate between browser esm vs. node esm

ref #1583
  • Loading branch information
yyx990803 committed Jan 20, 2021
1 parent 77329b7 commit 3a3029e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/resolve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function resolveExports(
) {
return _resolveExports(pkg, key, {
browser: true,
conditions: isProduction ? ['production'] : ['development']
conditions: ['module', isProduction ? 'production' : 'development']
})
}

Expand Down

0 comments on commit 3a3029e

Please sign in to comment.