Skip to content

Fix Vite 7 build: replace require() with ESM import, bump CI Node to 20.x - #128

Merged
w8r merged 2 commits into
dependabot/npm_and_yarn/rollup-4.59.0from
copilot/sub-pr-127
Mar 1, 2026
Merged

w8r merged 2 commits into
dependabot/npm_and_yarn/rollup-4.59.0from
copilot/sub-pr-127

Conversation

Copilot AI commented Mar 1, 2026 •

Copy link
Copy Markdown
Contributor

Vite 7 is ESM-only and requires Node.js ≥20.19. Both constraints were violated, causing CI builds to fail.

Changes

  • vite.config.ts: Replace require('./package.json').name with an ESM import pkg from './package.json' — require() triggers CJS loading of the config, which then fails to load the ESM-only Vite internals
  • .github/workflows/nodejs.yml: Bump node-version from 18.x → 20.x
-import { defineConfig } from 'vite';
+import { defineConfig } from 'vite';
+import pkg from './package.json';
 ...
-      name: require('./package.json').name,
+      name: pkg.name,

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…ode.js to 20.x in CI

Co-authored-by: w8r <26884+w8r@users.noreply.github.com>
Copilot AI changed the title [WIP] Update rollup from 4.53.3 to 4.59.0 Fix Vite 7 build: replace require() with ESM import, bump CI Node to 20.x Mar 1, 2026
Copilot finished work on behalf of w8r March 1, 2026 14:16
@w8r
w8r marked this pull request as ready for review March 1, 2026 14:33
@w8r
w8r merged commit 142f507 into dependabot/npm_and_yarn/rollup-4.59.0 Mar 1, 2026
@w8r
w8r deleted the copilot/sub-pr-127 branch March 1, 2026 14:33
w8r added a commit that referenced this pull request Mar 1, 2026
* Bump rollup from 4.53.3 to 4.59.0

Bumps [rollup](https://github.com/rollup/rollup) from 4.53.3 to 4.59.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](rollup/rollup@v4.53.3...v4.59.0)

---
updated-dependencies:
- dependency-name: rollup
  dependency-version: 4.59.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix Vite 7 build: replace require() with ESM import, bump CI Node to 20.x (#128)

* Initial plan

* Fix build: replace require() with import in vite.config.ts, upgrade Node.js to 20.x in CI

Co-authored-by: w8r <26884+w8r@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: w8r <26884+w8r@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: w8r <26884+w8r@users.noreply.github.com>
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