Open
Description
Repro
- Bug repro :
npm install @babylonjs/inspector && npm ls @types/react
- Expected result:
└── (empty)
- Current result:
└─┬ @babylonjs/[email protected]
├─┬ @babylonjs/[email protected]
│ └── @types/[email protected] deduped
├─┬ @types/[email protected]
│ └── @types/[email protected] deduped
└── @types/[email protected]
npm 8.19.3
Additional context
Installing react types creates big problems in projects using typescript and non-react frameworks like vue. See e.g. vuejs/language-tools#592
These package are distributed as a pre-built bundles with the main and module fields pointing to dist files, so there's no need to include build-time dependencies, but npm installs these because they are listed as peer dependencies:
Babylon.js/packages/public/@babylonjs/inspector/package.json
Lines 24 to 33 in d521fd0
Moving both @types/react
and @types/react-dom
from peerDependencies to devDependencies in these two packages would resolve the issue