Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

fix(lit-typescript-vite): support pnpm dependency resolution in Vite and TypeScript - #38

Closed
hoanle0126 wants to merge 1 commit into
webdriverio:mainfrom
hoanle0126:fix/lit-typescript-vite-pnpm-29
Closed

hoanle0126 wants to merge 1 commit into
webdriverio:mainfrom
hoanle0126:fix/lit-typescript-vite-pnpm-29

Conversation

@hoanle0126

Copy link
Copy Markdown

Fixes #29

When installing lit-typescript-vite dependencies with pnpm, transitive CommonJS dependencies of @wdio/browser-runner (such as grapheme-splitter, aria-query, expect, etc.) are not hoisted to the project root node_modules/. As a result, Vite cannot resolve bare package specifiers in optimizeDeps.include and serves grapheme-splitter as raw CommonJS without a default export.

  • Add @wdio/browser-runner > <pkg> entries in viteConfig.optimizeDeps.include so Vite pre-bundles CJS dependencies under both pnpm and npm.
  • Update moduleResolution to "bundler" in tsconfig.json and tsconfig.node.json.

@hoanle0126 hoanle0126 closed this Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

component-testing-examples/tree/main/lit-typescript-vite doesnt work when using pnpm

1 participant