Skip to content

fix(create): dedupe uikit/three in starter Vite scaffold - #50

Open
malewis5 wants to merge 1 commit into
facebook:mainfrom
malewis5:fix/scaffold-uikit-three-dedupe
Open

fix(create): dedupe uikit/three in starter Vite scaffold#50
malewis5 wants to merge 1 commit into
facebook:mainfrom
malewis5:fix/scaffold-uikit-three-dedupe

Conversation

@malewis5

Copy link
Copy Markdown

Summary

  • Fresh create @iwsdk apps crash loading the welcome UIKitML panel because Vite embeds two @pmndrs/uikit graphs (app super-three@0.181 vs @drawcall/uikitml's three@0.185).
  • Dedupe three / @pmndrs/uikit* in the scaffold Vite config and force a single three resolution via npm/pnpm overrides so Horizon kit components and HTML div containers share one Component class.
  • Declare @pmndrs/uikit, @pmndrs/uikit-horizon, and @pmndrs/uikit-lucide as direct dependencies so Vite resolve.dedupe / optimizeDeps.include can resolve them from the app root under pnpm (transitive-only installs break vite build on clean CI/Vercel).

Supersedes #49.

Test plan

  • pnpm create @iwsdk@latest (or local create from this branch) into a clean directory
  • pnpm install && pnpm dev
  • Confirm no browser error: Only pmndrs/uikit components can be added as children
  • Welcome panel renders with heading, divider, Enter XR button
  • rm -rf node_modules/.vite && pnpm install still produces a single uikit peer graph (no both three@0.185.1 and super-three@0.181.0 uikit builds in Vite deps)
  • From a clean install (no pre-existing root node_modules/@pmndrs), pnpm run build succeeds

Made with Cursor

Fresh create@iwsdk apps crash the welcome UIKitML panel when Vite embeds
two @pmndrs/uikit graphs (app super-three vs @drawcall/uikitml's three).
Dedupe three/uikit in the scaffold Vite config, force a single three
resolution via npm/pnpm overrides, and declare @pmndrs/uikit* as direct
deps so resolve.dedupe works under clean pnpm installs (e.g. Vercel).

Co-authored-by: Cursor <cursoragent@cursor.com>
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 10, 2026
@meta-codesync

meta-codesync Bot commented Aug 10, 2026

Copy link
Copy Markdown

@zjm-meta has imported this pull request. If you are a Meta employee, you can view this in D115459999.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant