Skip to content

Commit

Permalink
chore: remove unrelated diff
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Oct 18, 2024
1 parent 713cee3 commit 15f4875
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/vite/src/node/plugins/resolve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,11 @@ function resolveDeepImport(
`${path.join(dir, 'package.json')}.`,
)
}
} else if (options.mainFields.includes('browser') && isObject(browserField)) {
} else if (
options.webCompatible &&
options.mainFields.includes('browser') &&
isObject(browserField)
) {
// resolve without postfix (see #7098)
const { file, postfix } = splitFileAndPostfix(relativeId)
const mapped = mapWithBrowserField(file, browserField)
Expand Down

0 comments on commit 15f4875

Please sign in to comment.