-
Notifications
You must be signed in to change notification settings - Fork 8
Disable Vitest web optimizer for browser tests in Vite templates #1483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…th resolution with spaces Co-authored-by: Hristo313 <57346540+Hristo313@users.noreply.github.com>
Co-authored-by: Hristo313 <57346540+Hristo313@users.noreply.github.com>
Co-authored-by: Hristo313 <57346540+Hristo313@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>
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.