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 from Webpacker to ViteJS #24981
base: main
Are you sure you want to change the base?
Conversation
This pull request has merge conflicts that must be resolved before it can be merged. |
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.
Might be worth adding the following to .gitattributes
:
*.tsx.snap linguist-generated
*.jsx.snap linguist-generated
This will make the snapshots be collapsed by default when review the PRs.
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.
This is looking good, left comments on a few things I noticed when looking through it, though I know it's not fully ready yet.
Gemfile.lock
Outdated
|
||
RUBY VERSION | ||
ruby 3.2.2p53 | ||
|
||
BUNDLED WITH | ||
2.4.12 |
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.
I think this is normally not committed? (though I personally think it should be)
app/views/settings/two_factor_authentication/webauthn_credentials/new.html.haml
Outdated
Show resolved
Hide resolved
I am not sure this is a good idea, you might want to review any diffs in snapshots to ensure the snapshot did not get updated to something not expected? |
This pull request has resolved merge conflicts and is ready for review. |
This pull request has merge conflicts that must be resolved before it can be merged. |
This pull request has resolved merge conflicts and is ready for review. |
This pull request has merge conflicts that must be resolved before it can be merged. |
I was looking around at blockers to updating Node and stumbled across this one ... I wonder if there's a more incremental way to do things here? Migrating one piece at a time instead of bigger replacement? The only thing that comes to mind here would be to try to isolate the various areas (admin web pages, user settings pages, the main react app, etc) and/or also isolate the assets, stylesheets, images, fonts, etc -- and try to go piece by piece there instead of all at one. I can open a POC PR along those lines if you think that might nudge this forward. |
We could try to migrate entrypack per entrypack, but it is quite limited because of the shared code between them, which may need to be adapted from Vite, or handle both Vite & Webpack, which can be complex. I stopped my work on this because it will not be mergeable until 4.2 is released, but I still intent to have it all migrated. I could extract the migration from |
This pull request has resolved merge conflicts and is ready for review. |
This pull request has merge conflicts that must be resolved before it can be merged. |
This pull request has merge conflicts that must be resolved before it can be merged. |
19dd515
to
5b13aff
Compare
This pull request has resolved merge conflicts and is ready for review. |
b56cbc8
to
8e7cb56
Compare
Some more updates:
|
This pull request has merge conflicts that must be resolved before it can be merged. |
This pull request has resolved merge conflicts and is ready for review. |
This pull request has merge conflicts that must be resolved before it can be merged. |
This pull request has resolved merge conflicts and is ready for review. |
This pull request has merge conflicts that must be resolved before it can be merged. |
Warning: this is a big work in progress with a lot of things not working.
Is it based on my #24906 PR, so ignore Intl-related commits for now.
With this change, the frontend toolchain is managed by Vite, a fast Javascript bundler based on
esbuild
. It brings a lot of improvements, including support for all modern JS features, much more efficient code-splitting, far less required packages (from 1669 to 1139 at my last count) and a much improved performance.Todo:
media/images/…
paths, and how they should be handled