Skip to content
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

Migrate to Vite #171

Open
sammaji opened this issue Apr 4, 2023 · 5 comments
Open

Migrate to Vite #171

sammaji opened this issue Apr 4, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@sammaji
Copy link

sammaji commented Apr 4, 2023

Description

What kind of feature you are suggesting?

As you know, CRA is slow. I recommend using Vite. Even the official react docs recommend using vite.

Does it solve any problem?

Using Vite would significantly reduce build time, improving developer experience.
It does not have any effect on the production version.

Screenshots

No response

Additional information

No response

@sammaji sammaji added the enhancement New feature or request label Apr 4, 2023
@nilsnolde nilsnolde changed the title [Suggestion] Migrate to Vite Migrate to Vite Apr 4, 2023
@chrstnbwnkl
Copy link
Contributor

We've been having Vite on our Radar, but were hesitant to jump on yet another hype train. But now that they recommend it in React's beta docs (and mention CRA nowhere anymore), I think it's safe to migrate (also, the speed increase is just mind blowing 🤯 )

@Sheikh-JamirAlam
Copy link
Contributor

Agreed. Using Vite is way better than CRA.
I can work on this issue if no one else is assigned.

@sammaji
Copy link
Author

sammaji commented Apr 4, 2023

Hey @chrstnbwnkl @nilsnolde,

While migrating I found some issues that needs to be addressed

  1. In file src/Controls/Isochrones/Waypoint there is an error (says ESLint Parsing error: Unexpected token). The solution is to use "@babel/eslint-parser"

parser

  1. Vite does not allow ".js" extension for files containing react components. So all files containing react components needs to be renamed ".jsx"

  2. Vite path aliases are needed.

For now, I did not remove react-scripts.

@sammaji sammaji mentioned this issue Apr 4, 2023
4 tasks
@Himanshu2561
Copy link

Hello @chrstnbwnkl @samyabrata-maji I am also a react developer and i have migrated my previous project from CRA to Vitejs,
So you are right we you need to rename the component's extinsions to jsx to follow jsx syntax.
It's cool vitejs is blazing fast and everyone is using it, infact the beginners.

I would like to contribute to this project because i think i have the relivent skills.
I can migrate the app to vitejs if you can assign me the role. 👍

@pawelborkar
Copy link

pawelborkar commented Sep 30, 2023

Hi @chrstnbwnkl, I would like to help migrate the project to vite. I also have a question regarding the package manager should we use pnpm instead of npm since it will also increase the developer experience substantially.

Would like to know your opinion on this.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants