Skip to content

Migration to Vite Tooling #903

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

Draft
wants to merge 31 commits into
base: master
Choose a base branch
from
Draft

Migration to Vite Tooling #903

wants to merge 31 commits into from

Conversation

ashutoshpw
Copy link
Collaborator

@ashutoshpw ashutoshpw commented Jun 3, 2025

This PR migrates the project from using Craco (Create React App Configuration Override) to Vite for significantly improved build performance and modern development experience.

πŸš€ Key Benefits

  • ⚑ Faster Development: Vite's HMR is significantly faster than Webpack
  • πŸ—οΈ Faster Builds: Vite uses Rollup for optimized production builds
  • πŸ“¦ Better Tree Shaking: Improved bundle optimization
  • πŸ”§ Modern Tooling: Native ES modules and better TypeScript support

πŸ“‹ Changes Made

Build System Migration

  • Replaced @craco/craco and react-scripts with vite and @vitejs/plugin-react
  • Removed craco.config.js and created vite.config.ts with equivalent configuration
  • Updated package.json scripts:
    • yarn dev (replaces craco start)
    • yarn build (replaces craco build)
    • yarn preview (new - preview production build)

Configuration & Dependencies

  • Node.js Polyfills: Added vite-plugin-node-polyfills to maintain compatibility with crypto, buffer, stream, etc.
  • SVG Support: Added vite-plugin-svgr for React component SVG imports
  • Environment Variables: Configured to support existing REACT_APP_ prefixed variables
  • Path Aliases: Maintained absolute imports from src/ directory

Code Updates

  • HTML Structure: Moved index.html to root with Vite entry point structure
  • CSS Imports: Updated relative CSS imports (e.g., "./App.css")
  • SVG Imports: Updated all SVG imports to use ?react suffix for SVGR compatibility
  • Dynamic Imports: Fixed dynamic imports to use explicit file extensions for Vite compatibility

Build Output

  • Maintains build/ directory structure for deployment compatibility
  • Source maps enabled for debugging
  • Optimized chunking and tree shaking
  • Compatible with existing _redirects file for SPA routing

πŸ“Š Performance Impact

Build times are significantly reduced and development server startup is faster. The warnings about large chunks are expected for this application size and can be addressed in future optimizations if needed.

ashutoshpw and others added 28 commits November 16, 2024 17:31
* csv votes download

* fix node version

* updated dependencies
* desktop update

* responsive tables

* no items + scroll on other tabs

* searchbar

* transactions filters working

* search bar & filter dialog for token tab

* filters & xtz added to list of holdings

* nft filters & responsive dialogs

* Update FilterNFTDialog.tsx

---------

Co-authored-by: Manank Patni <manank321@gmail.com>
* voting grouping & dependencies upgraded

* stylings add to tooltip

* mobile css

* pagination & css fix

* votes grouping in csv file

* requested changes

* decimals for isXTZ

* fix

* fix
* frontend with mocks

* initial integration

* API working

* ACI Form with various entrypoints

* Update  node version

* Fix for API in ACI

* WIP - ACI Implementation Debugging

* WIP - ACI Interaction (Pseudocode working)

* Error handling + Params now being passed into generated lambda

* Changes for adding ACI Executor and simplified UI components

* Removed Cycle Ignore Option

* Fixed prettier issues

* Added ACI Contract within the form  & fixed the "Submit" button.

* Improved Components for ConfigProposalForm

* Removed unused imports

* Modal Improvements

* Renamed simple lambda 3 to ACI_Executor

* Fixed Other UI Issues

---------

Co-authored-by: Ashutosh Kumar <ashutosh@w3dev.in>
Co-authored-by: Ashutosh Kumar <ashutoshpw@users.noreply.github.com>
Copy link

netlify bot commented Jun 3, 2025

❌ Deploy Preview for tezos-homebase failed. Why did it fail? β†’

Name Link
πŸ”¨ Latest commit 4b434c8
πŸ” Latest deploy log https://app.netlify.com/projects/tezos-homebase/deploys/6888c30f4c264800085283b7

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