redstone-js icon indicating copy to clipboard operation
redstone-js copied to clipboard

feat: Migrate project to Vite

Open LostMyCode opened this issue 4 months ago • 1 comments

This pull request migrates the project's build system from Webpack to Vite. This change aims to significantly improve the development experience with faster cold starts and hot module replacement (HMR), as well as optimize the build process for production.

Key changes include:

  • Removal of Webpack and Babel configurations: All Webpack-specific files (webpack.config.js, .babelrc) and related dependencies have been removed.
  • Introduction of Vite: A new vite.config.js has been added, configuring Vite with React support and Node.js polyfills for browser compatibility.
  • Dependency updates: package.json has been updated to include Vite and @vitejs/plugin-react, while removing all Webpack and Babel dependencies.
  • File renaming: All .js React component files and entry points in src/ have been renamed to .jsx to clearly indicate they contain JSX syntax and to leverage Vite's optimized handling of such files.
  • HTML entry point update: public/index.html has been updated to index.html at the root and now includes the Vite module script (/src/index.jsx).
  • ES Module adjustments: Minor adjustments were made in utils/BufferReader.js to remove CommonJS module.exports, aligning with the ES Module standard enforced by Vite.

This migration streamlines the development workflow and sets the foundation for a more modern and efficient build environment.

LostMyCode avatar Oct 26 '25 04:10 LostMyCode

Summary of Changes

Hello @LostMyCode, I'm Gemini Code Assist[^1]! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request undertakes a major architectural shift by replacing the existing Webpack build system with Vite. This strategic move is designed to modernize the development workflow, drastically reduce build times, and enhance the overall developer experience through faster feedback loops and a more efficient production build process. The changes encompass configuration updates, dependency management, and file structure adjustments to fully integrate Vite.

Highlights

  • Build System Migration: The project's build system has been fully migrated from Webpack to Vite, aiming for a significantly improved development experience with faster cold starts and Hot Module Replacement (HMR).
  • Configuration and Dependency Overhaul: All Webpack and Babel configurations (.babelrc, webpack.config.js) and their associated dependencies have been removed. New Vite configurations (vite.config.js) and dependencies (@vitejs/plugin-react, vite, vite-plugin-node-polyfills) have been introduced.
  • File Renaming for JSX: All React component files and entry points in src/ have been renamed from .js to .jsx to explicitly denote JSX content and leverage Vite's optimized handling.
  • ES Module Alignment: Minor adjustments were made in utils/BufferReader.js to remove CommonJS module.exports, ensuring full compatibility with the ES Module standard enforced by Vite.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

[^1]: Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

gemini-code-assist[bot] avatar Oct 26 '25 04:10 gemini-code-assist[bot]