Disable Vitest web optimizer for browser tests in Vite templates#1483
Closed
Disable Vitest web optimizer for browser tests in Vite templates#1483
Conversation
…th resolution with spaces Co-authored-by: Hristo313 <57346540+Hristo313@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing CodeGen End2End tests in React and Web Components
Fix Vite module resolution for apps with spaces in directory names
Jan 30, 2026
Co-authored-by: Hristo313 <57346540+Hristo313@users.noreply.github.com>
Copilot
AI
changed the title
Fix Vite module resolution for apps with spaces in directory names
Revert unwanted yarn.lock changes
Feb 2, 2026
Co-authored-by: Hristo313 <57346540+Hristo313@users.noreply.github.com>
Copilot
AI
changed the title
Revert unwanted yarn.lock changes
Add dependency optimizer configurations to Vite templates
Feb 2, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses failing CodeGen end-to-end tests in React and Web Components templates by adding Vite dependency optimization configurations to improve module resolution and prevent pre-bundling issues during testing.
Changes:
- Added
optimizeDeps: { exclude: [] }configuration to control dependency pre-bundling behavior - Disabled Vitest web optimizer (
test.deps.optimizer.web.enabled: false) to prevent browser test failures - Added
base: './'for improved relative path resolution
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/cli/templates/webcomponents/igc-ts/projects/_base/files/vite.config.ts | Added base path, dependency optimization, and test optimizer configurations to Web Components Vite template |
| packages/cli/templates/react/igr-ts/projects/_base/files/vite.config.ts | Added base path, dependency optimization, and test optimizer configurations to React Vite template |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/cli/templates/webcomponents/igc-ts/projects/_base/files/vite.config.ts
Outdated
Show resolved
Hide resolved
packages/cli/templates/react/igr-ts/projects/_base/files/vite.config.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Hristo313 <57346540+Hristo313@users.noreply.github.com>
Copilot
AI
changed the title
Add dependency optimizer configurations to Vite templates
Disable Vitest web optimizer for browser tests in Vite templates
Feb 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Vitest configuration to React and Web Components Vite templates to prevent browser test failures caused by dependency optimization issues during CodeGen end-to-end tests.
Changes
test.deps.optimizer.web.enabled: falseto disable web worker dependency optimization during browser-based testsConfiguration
Complements the existing
base: './'configuration for improved path handling in generated projects.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.