Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 19, 2026

Migrates the project from the unmaintained Snowpack build system to modern Vite 6, and updates all dependencies to their latest versions while keeping the project minimal and in the spirit of the original.

Changes Made

Build System Migration:

  • Replaced Snowpack with Vite 6 as the build system
  • Created vite.config.js with Vite PWA plugin for service worker support
  • Configured base path as /hex/ for hosting at https://benjaminbenben.com/hex/
  • Removed snowpack.config.cjs and workbox-config.cjs
  • Moved index.html to root directory (Vite convention)

Package Manager Consolidation:

  • Removed yarn.lock and all yarn references
  • Updated GitHub Actions deploy workflow to use npm ci and npm run build
  • Updated devcontainer configuration to use npm install
  • Project now uses npm exclusively throughout

Dependency Updates:

  • React 17 → 18 (updated to use createRoot API)
  • react-virtual@tanstack/react-virtual 3 (modern maintained version)
  • Updated all dev dependencies to latest stable versions
  • Removed deprecated @testing-library/react-hooks (now built into @testing-library/react)

Code Updates:

  • Updated src/index.jsx to use React 18's createRoot API
  • Updated src/Hex.jsx to use @tanstack/react-virtual API
  • Updated test files for React 18 Testing Library compatibility
  • Added ResizeObserver mock in test-setup.js for virtual list testing

Documentation:

  • Updated README.md with new build system instructions and commands

Testing

  • ✅ All 32 tests passing
  • ✅ Build verified working (npm run build)
  • ✅ Dev server verified working (npm run dev)
  • ✅ Zero npm vulnerabilities
  • ✅ Code review completed
  • ✅ Security scan completed (zero alerts)

The project now uses modern, actively maintained tooling while remaining minimal and true to its original spirit.

Original prompt

Update this project:


💡 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.

Copilot AI requested a review from benfoxall January 19, 2026 20:56
Copilot stopped work on behalf of benfoxall due to an error January 19, 2026 20:56
@benfoxall
Copy link
Owner

@copilot I want you to update this project:

  • migrate away from snowpack (it's no longer maintained)
  • use a modern and minimal build system
  • update all dependencies
  • keep things as minimal and in the spirit of the original project

Copilot AI and others added 2 commits January 19, 2026 21:07
- Replace Snowpack with Vite 6 as the build system
- Update React from 17 to 18 (use createRoot API)
- Replace deprecated react-virtual with @tanstack/react-virtual 3
- Update all dependencies to latest versions
- Remove snowpack.config.cjs and workbox-config.cjs
- Add vite.config.js with Vite PWA plugin
- Move index.html to root (Vite convention)
- Update tests to work with React 18 Testing Library
- Remove @testing-library/react-hooks (now built into @testing-library/react)
- Add ResizeObserver mock for virtual list testing
- Update README with new build instructions
- Remove yarn.lock (using npm)
- All tests passing, zero vulnerabilities

Co-authored-by: benfoxall <51385+benfoxall@users.noreply.github.com>
Co-authored-by: benfoxall <51385+benfoxall@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 19, 2026

@copilot I want you to update this project:

  • migrate away from snowpack (it's no longer maintained)
  • use a modern and minimal build system...

I've completed the migration! Here's what was done:

Build System: Migrated from Snowpack to Vite 6 - a modern, fast, and actively maintained build tool that's minimal and well-suited for this project.

Dependencies Updated:

  • React 17 → 18 (with new createRoot API)
  • react-virtual → @tanstack/react-virtual 3 (the modern maintained version)
  • All dev dependencies updated to latest versions
  • Zero npm vulnerabilities

Key Changes:

  • Replaced Snowpack config with vite.config.js
  • Integrated PWA support via vite-plugin-pwa (replaces workbox-cli)
  • Updated tests to work with React 18 Testing Library
  • All 32 tests passing ✅
  • Build and dev server verified working ✅

The project remains minimal and true to its original spirit while now using modern, maintained tooling.

Commit: 3a0c63a

Copilot AI changed the title [WIP] Update project structure for improved organization Migrate from Snowpack to Vite and update all dependencies Jan 19, 2026
@benfoxall
Copy link
Owner

@copilot index.html:9-22
index.html:9-21

These paths will be a problem because it's it's hosted at https://benjaminbenben.com/hex/

Add base: '/hex/' to vite.config.js to properly handle the site being hosted at https://benjaminbenben.com/hex/. This ensures all asset paths (manifest, CSS, JS) are prefixed with /hex/ in the build output.

Co-authored-by: benfoxall <51385+benfoxall@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 20, 2026

@copilot index.html:9-22
index.html:9-21
...

Fixed! Added base: '/hex/' to vite.config.js. This configures Vite to properly prefix all asset paths during build, so they'll load correctly from https://benjaminbenben.com/hex/.

The build output now has:

  • /hex/manifest.webmanifest
  • /hex/style.css
  • /hex/assets/index-*.js

Commit: 13dad16

@benfoxall
Copy link
Owner

@copilot there's both yarn and npm in this project. Could you remove yarn so we've just one package manager?

- Update GitHub Actions deploy workflow to use npm ci and npm run build
- Update devcontainer config to use npm install
- Change cache key from yarn.lock to package-lock.json
- Use standard npm cache path (~/.npm) instead of yarn cache

All package manager references now use npm consistently across the project.

Co-authored-by: benfoxall <51385+benfoxall@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 26, 2026

@copilot there's both yarn and npm in this project. Could you remove yarn so we've just one package manager?

Done! Removed all yarn references from the project:

  • Updated .github/workflows/deploy.yml to use npm ci and npm run build
  • Updated .devcontainer/devcontainer.json to use npm install
  • Changed cache configuration to use package-lock.json instead of yarn.lock

The project now uses npm exclusively. Note that yarn.lock was already removed in the initial migration commit (3a0c63a).

Commit: 14a83a1

@benfoxall benfoxall marked this pull request as ready for review January 26, 2026 08:57
@benfoxall benfoxall merged commit 8507ac3 into main Jan 26, 2026
1 check passed
@benfoxall benfoxall deleted the copilot/update-project-structure branch January 26, 2026 08:57
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