Skip to content

fix(build): adapt to Vite 8/rolldown chunking behavior#1996

Draft
Copilot wants to merge 3 commits intodependabot/npm_and_yarn/vite-555ff24f4afrom
copilot/sub-pr-1994-again
Draft

fix(build): adapt to Vite 8/rolldown chunking behavior#1996
Copilot wants to merge 3 commits intodependabot/npm_and_yarn/vite-555ff24f4afrom
copilot/sub-pr-1994-again

Conversation

Copy link
Contributor

Copilot AI commented Mar 13, 2026

Vite 8 (rolldown) extracts shared code between multiple entry points into a root-level chunk. With both tools/lib and tools/cli as entries sharing lib.ts, rolldown placed the actual code in dist/lib.mjs (root), making dist/tools/lib.mjs a thin re-export. This broke the dynamic imports in lib.ts:

// dist/lib.mjs (root) resolved agents relative to dist/, not dist/tools/
import(`./${buildAgent}/agent.mjs`)  // → dist/github/agent.mjs ❌
                                      // expected dist/tools/github/agent.mjs

Changes

  • Split build:tools into two sequential builds

    • build:tools:libtools/lib + tool runners only; single-purpose entries prevent rolldown from extracting a shared chunk, so dist/tools/lib.mjs is the actual code again
    • build:tools:clitools/cli as a standalone single-entry bundle with lib.ts inlined
  • New src/tools/vite.config.cli.mts for the CLI-only build

  • dist/azure/manifest.config.cjs — add rolldown-runtime.mjs to packaged files; Vite 8/rolldown generates this new file for CJS→ESM conversion (required by semver)


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copilot AI and others added 2 commits March 13, 2026 21:48
Co-authored-by: arturcic <1760506+arturcic@users.noreply.github.com>
… issue

Co-authored-by: arturcic <1760506+arturcic@users.noreply.github.com>
@sonarqubecloud
Copy link

Copy link
Contributor Author

Copilot AI commented Mar 13, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

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)

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

Copilot AI changed the title [WIP] Update vite group across 1 directory with 3 updates fix(build): adapt to Vite 8/rolldown chunking behavior Mar 13, 2026
Copilot AI requested a review from arturcic March 13, 2026 22:00
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