vite3 does not respect browser field in dependeicies' package.json using yarn pnp in dev mode #9092
Closed
7 tasks done
Labels
duplicate
This issue or pull request already exists
Describe the bug
I tried to introduce a dependency that has a browser field resolve to
false
in package.jsonI am using yarn PnP mode and the package name is
object-inspect
.However, during import in development the page throws error in browser console
Reproduction
Clone the following
https://github.com/smeng9/vite-browser-field
Or
$ yarn add object-inspect
import inspect from "object-inspect"
in src/App.jsxSystem Info
Used Package Manager
yarn
Logs
Only the running
$ yarn dev
has the problem, running$ yarn build && yarn preview
does not have any problem$ yarn dev
$ yarn build
Validations
The text was updated successfully, but these errors were encountered: