Describe the bug
when using npm, TS infers browser namespace successfully:
but when using pnpm, it fails without installing @types/chrome manually:
we may need to improve docs or fix: this might be related to how pnpm handles devDependencies differently from npm.
Reproduction
just start fresh projects with pnpm following installation docs.
Steps to reproduce
after installing, put your cursor on browser.runtime.* to see the inferred types.
for example, browser.runtime.id in entrypoints/background.ts.
System Info
System:
OS: macOS 15.0.1
CPU: (11) arm64 Apple M3 Pro
Memory: 2.53 GB / 36.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.18.0 - ~/.nvm/versions/node/v20.18.0/bin/node
npm: 10.8.2 - ~/.nvm/versions/node/v20.18.0/bin/npm
pnpm: 9.9.0 - /opt/homebrew/bin/pnpm
Browsers:
Chrome: 130.0.6723.70
Safari: 18.0.1
npmPackages:
wxt: ^0.19.11 => 0.19.13
Used Package Manager
pnpm
Validations
Describe the bug
when using npm, TS infers browser namespace successfully:
but when using pnpm, it fails without installing
@types/chromemanually:we may need to improve docs or fix: this might be related to how pnpm handles devDependencies differently from npm.
Reproduction
just start fresh projects with pnpm following installation docs.
Steps to reproduce
after installing, put your cursor on
browser.runtime.*to see the inferred types.for example,
browser.runtime.idinentrypoints/background.ts.System Info
System: OS: macOS 15.0.1 CPU: (11) arm64 Apple M3 Pro Memory: 2.53 GB / 36.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 20.18.0 - ~/.nvm/versions/node/v20.18.0/bin/node npm: 10.8.2 - ~/.nvm/versions/node/v20.18.0/bin/npm pnpm: 9.9.0 - /opt/homebrew/bin/pnpm Browsers: Chrome: 130.0.6723.70 Safari: 18.0.1 npmPackages: wxt: ^0.19.11 => 0.19.13Used Package Manager
pnpm
Validations