-
Notifications
You must be signed in to change notification settings - Fork 0
Migrate from Snowpack to Vite and update all dependencies #3
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
Conversation
|
@copilot I want you to update this project:
|
- 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>
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:
Key Changes:
The project remains minimal and true to its original spirit while now using modern, maintained tooling. Commit: 3a0c63a |
|
@copilot index.html:9-22 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>
Fixed! Added The build output now has:
Commit: 13dad16 |
|
@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>
Done! Removed all yarn references from the project:
The project now uses npm exclusively. Note that Commit: 14a83a1 |
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:
vite.config.jswith Vite PWA plugin for service worker support/hex/for hosting at https://benjaminbenben.com/hex/snowpack.config.cjsandworkbox-config.cjsindex.htmlto root directory (Vite convention)Package Manager Consolidation:
yarn.lockand all yarn referencesnpm ciandnpm run buildnpm installDependency Updates:
createRootAPI)react-virtual→@tanstack/react-virtual3 (modern maintained version)@testing-library/react-hooks(now built into@testing-library/react)Code Updates:
src/index.jsxto use React 18'screateRootAPIsrc/Hex.jsxto use@tanstack/react-virtualAPItest-setup.jsfor virtual list testingDocumentation:
Testing
npm run build)npm run dev)The project now uses modern, actively maintained tooling while remaining minimal and true to its original spirit.
Original prompt
💡 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.