-
Notifications
You must be signed in to change notification settings - Fork 14
v2.0.0: Migrate from CreateReactApp to Vite #31
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
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
0cebf84
to
f29fd40
Compare
f29fd40
to
139ba37
Compare
bf72b26
to
a35db5b
Compare
a35db5b
to
e9d57eb
Compare
@ViolanteCodes I added a fix for scrolling. Could you check if it works correctly on your end? |
PR Summary: Migrate from Create React App to Vite Major Changes: 1. Build System Migration: Converted from Create React App to Vite - Added vite.config.js with React plugin configuration - Updated build scripts in package.json to use Vite commands - Moved index.html from public/ to project root as required by Vite - Added JSConfig for better TypeScript support 2. React Router Upgrade: - Updated from React Router v5 to v6.22.3 - Replaced Switch with Routes component - Improved route handling with proper nesting - Fixed NoApiKey page routing by ensuring it's wrapped in Router context 3. React 18 Upgrade: - Updated to React 18.2.0 - Replaced ReactDOM.render with createRoot API - Added StrictMode wrapper for better development experience 4. File Extensions: - Renamed all React component files from .js to .jsx for better Vite integration - Updated imports accordingly throughout the project 5. Environment Variables: - Updated from process.env to import.meta.env for environment variables - Fixed API token handling in buttercmssdk.js 6. Component Improvements: - Enhanced Layout component with better scroll behavior - Improved blog navigation handling - Fixed 404 page to use NotFoundSection component 7. Dependencies: - Updated ButterCMS SDK to version 3.0.0 - Updated all testing libraries - Added Vite-related dependencies 8. Documentation: - Updated README with new information about the Vite migration - Added section describing recent updates Benefits: - Faster build and dev server times with Vite - Modern React patterns with React 18 and React Router 6 - Improved error handling and user experience - Better routing system with consistent behavior Testing Notes: - Verified that the app works with and without an API token - Confirmed all routes function correctly with the new Router implementation - Tested blog navigation and category functionality
c681c38
to
fdbe1d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few cosmetic changes we can provide
Good job 🎉
@marcin-pece added a bunch of returns and newlines :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
@LenardMarcin This is ready for QA :) |
PR Summary: Migrate from Create React App to Vite
Major Changes:
- Added vite.config.js with React plugin configuration
- Updated build scripts in package.json to use Vite commands
- Moved index.html from public/ to project root as required by Vite
- Added JSConfig for better TypeScript support
- Updated from React Router v5 to v6.22.3
- Replaced Switch with Routes component
- Improved route handling with proper nesting
- Fixed NoApiKey page routing by ensuring it's wrapped in Router
context
- Updated to React 18.2.0
- Replaced ReactDOM.render with createRoot API
- Added StrictMode wrapper for better development experience
- Renamed all React component files from .js to .jsx for better Vite
integration
- Updated imports accordingly throughout the project
- Updated from process.env to import.meta.env for environment variables
- Fixed API token handling in buttercmssdk.js
- Enhanced Layout component with better scroll behavior
- Improved blog navigation handling
- Fixed 404 page to use NotFoundSection component
- Updated ButterCMS SDK to version 3.0.0
- Updated all testing libraries
- Added Vite-related dependencies
- Updated README with new information about the Vite migration
- Added section describing recent updates
Benefits:
Testing Notes:
implementation