Skip to content

Add @openai/apps-sdk-ui packages to optimizeDeps#11

Merged
infiton merged 1 commit intomainfrom
alan/add-openai-deps
Dec 19, 2025
Merged

Add @openai/apps-sdk-ui packages to optimizeDeps#11
infiton merged 1 commit intomainfrom
alan/add-openai-deps

Conversation

@alanko0511
Copy link
Contributor

@alanko0511 alanko0511 commented Dec 18, 2025

Previously, the plugin only conditionally included the Gadget package in Vite's optimizeDeps.include configuration, which meant that projects using the @openai/apps-sdk-ui package would fail to load on the first page visit during development, requiring users to manually refresh the page before the widgets would work.

This PR adds an optimizeDeps.entries configuration that tells Vite to scan all widget files (${widgetsDir}/**/*.{jsx,tsx}) as entry points for dependency optimisation. This ensures that any dependencies imported by widget components—including UI libraries like the Gadget package or OpenAI Apps SDK UI components—are automatically discovered and pre-bundled by Vite, allowing widgets to load correctly on the first visit without requiring a page refresh.

@alanko0511 alanko0511 requested a review from infiton December 18, 2025 18:59
Revert "Add @openai/apps-sdk-ui packages to optimizeDeps"

This reverts commit 74203ad.

Add @openai/apps-sdk-ui packages to optimizeDeps
@infiton infiton merged commit 066403e into main Dec 19, 2025
3 checks passed
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.

2 participants