Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 30, 2026

Vite fails to resolve modules when project directories contain spaces, causing CodeGen End2End test failures with import errors, timeouts, and browser crashes.

Changes

  • Added base: './' to React Vite config template
  • Added base: './' to Web Components Vite config template

Technical Details

Without explicit base path configuration, Vite generates absolute paths that fail when directory names contain spaces (e.g., /My%20Test%20App/src/main.tsx). Setting base: './' forces relative path resolution, bypassing URL encoding issues.

Affected templates:

  • packages/cli/templates/react/igr-ts/projects/_base/files/vite.config.ts
  • packages/cli/templates/webcomponents/igc-ts/projects/_base/files/vite.config.ts

Before:

export default defineConfig({
  build: {
    chunkSizeWarningLimit: 10 * 1024 * 1024,
  },
  // ...
})

After:

export default defineConfig({
  base: './',
  build: {
    chunkSizeWarningLimit: 10 * 1024 * 1024,
  },
  // ...
})

This resolves failures in apps like "Colors (with parameters)", "User Story 2 (HData repeated)", and "Master-detail side by side".

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • vite.dev
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)
  • www.google-analytics.com
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/igniteui-cli/igniteui-cli/packages/cli/bin/execute.js new My Test App --framework=react --type=igr-ts --skip-git (dns block)
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/igniteui-cli/igniteui-cli/packages/cli/bin/execute.js new My WC App --framework=webcomponents --type=igc-ts --skip-git (dns block)
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/igniteui-cli/igniteui-cli/packages/cli/bin/execute.js new normalapp --framework=react --type=igr-ts --skip-git _modules/.bin/ty168.63.129.16 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>[React, WC]: Failing CodeGen End2End tests with errors in vitest</issue_title>
<issue_description>Currently, there are some failing apps when running CodeGen End2End tests

For React:

For React and Web Components:

For Web Components:

<agent_instructions>The problems might be because of the spaces in the names of the apps. Probably changes in the vite configuration ?</agent_instructions>

Comments on the Issue (you are @copilot in this section)

  • Fixes IgniteUI/CodeGen#2180

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…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
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