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

Replace craco / webpack frontend module bundler with vite #6531

Open
spwoodcock opened this issue Aug 20, 2024 · 4 comments · May be fixed by #6534
Open

Replace craco / webpack frontend module bundler with vite #6531

spwoodcock opened this issue Aug 20, 2024 · 4 comments · May be fixed by #6534

Comments

@spwoodcock
Copy link
Member

Is your feature request related to a problem? Please describe.

  • We currently use craco, which is a custom wrapper for webpack and probably not recommended going forward.
  • For context, we have recently undergone a large dependency upgrade for the frontend.

Describe the solution you'd like

  • Now deps should be updated, we should also migrate to vite, a more modern module bundler.
  • Speed: vite will include rolldown in future, a high-performance re-write of rollup in Rust.
    • Faster production builds.
    • Faster dev server reloads.

Describe alternatives you've considered

  • Bun, but it's still to early.

Related to #5499

@JoltCode
Copy link
Collaborator

Another alternative for the list to consider is rspack - https://rspack.dev/ 😄

@spwoodcock
Copy link
Member Author

spwoodcock commented Aug 20, 2024

Have you used rspack before?

From my understanding:
webpack --> rspack
rollup + esbuild --> rolldown (+vite)
Both are rust libraries build to speed up bundling, doing the same thing.

It's hard to assess what the pros / cons of each might be though!

Note

Update - I really like the look of where rolldown and the oxc compiler are going.
It seems like a solid foundation for the future of bundling, but I could be wrong!

@JoltCode
Copy link
Collaborator

Have you used rspack before?

From my understanding: webpack --> rspack rollup + esbuild --> rolldown (+vite) Both are rust libraries build to speed up bundling, doing the same thing.

It's hard to assess what the pros / cons of each might be though!

Note

Update - I really like the look of where rolldown and the oxc compiler are going. It seems like a solid foundation for the future of bundling, but I could be wrong!

Yeah exactly.

And I have used it - although only on a side project - in my opinion I think it's better for us to go with Vite, for the same reasons which you listed.

Let's just go for vite 😄

@spwoodcock
Copy link
Member Author

Note

Based on discussions, this isn't such a simple task, as it involves renaming all .js files to have a .jsx extension if they are React components...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants