Modernize the javascript and bundle everything with Vite#1392
Merged
eliotjordan merged 100 commits intomainfrom Jul 29, 2024
Merged
Modernize the javascript and bundle everything with Vite#1392eliotjordan merged 100 commits intomainfrom
eliotjordan merged 100 commits intomainfrom
Conversation
8126f8c to
8c810ff
Compare
This was
linked to
issues
Jul 8, 2024
8c810ff to
2bde746
Compare
dnoneill
reviewed
Jul 10, 2024
dnoneill
reviewed
Jul 10, 2024
dnoneill
reviewed
Jul 10, 2024
dnoneill
reviewed
Jul 10, 2024
dnoneill
reviewed
Jul 10, 2024
dnoneill
reviewed
Jul 11, 2024
dnoneill
reviewed
Jul 11, 2024
dnoneill
reviewed
Jul 11, 2024
dnoneill
reviewed
Jul 11, 2024
dnoneill
reviewed
Jul 11, 2024
dnoneill
reviewed
Jul 11, 2024
dnoneill
reviewed
Jul 11, 2024
dnoneill
reviewed
Jul 11, 2024
dnoneill
reviewed
Jul 11, 2024
dnoneill
reviewed
Jul 11, 2024
dnoneill
reviewed
Jul 11, 2024
dnoneill
reviewed
Jul 11, 2024
dnoneill
reviewed
Jul 11, 2024
dnoneill
reviewed
Jul 11, 2024
dnoneill
reviewed
Jul 11, 2024
dnoneill
reviewed
Jul 11, 2024
dnoneill
reviewed
Jul 11, 2024
dnoneill
reviewed
Jul 11, 2024
dnoneill
reviewed
Jul 11, 2024
dnoneill
reviewed
Jul 11, 2024
dnoneill
reviewed
Jul 11, 2024
Setting a huge height with !important caused these viewers to be much larger than their container.
This fixes the height issue with the initial render.
We now only support Rails 7, and no longer build the test app without javascript, so these Hotwire libraries will always be installed automatically and don't need special handling.
Both `yarn link` and `npm link` do not install the dependencies of the linked package. This means that things like leaflet are not actually available in a dev/test context when building the frontend, even though they would be in a production context where the frontend package is installed normally. This PR fixes the situation by borrowing the same approach as blacklight, which instead adds the package with `yarn add` pointing to the parent directory. This way, its dependencies will be installed at the correct level and available for building with Vite.
1a8e7d7 to
ddcb274
Compare
Add ability to run template.rb with a branch
Contributor
|
Yayyy!! 🥳 Great work everyone. |
dnoneill
pushed a commit
that referenced
this pull request
Jul 30, 2024
Modernize the javascript and bundle everything with Vite
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ref #1132
You may need to completely delete
.internal_test_appfor the generators to re-run correctly.This updates all of the javascript to ES6 (borrowing somewhat from #1344). It also removes sprockets imports from these files and instead uses Vite to bundle all of the JS and CSS for the app.
The
app/assets/javascriptsdirectory goes away, in favor of everything being listed inapp/javascriptlike the other entrypoints. Many structures that made use of jQuery have been converted into Stimulus controllers and are now Turbo-compatible.In general, everything that was vendorized or referenced from a gem is now installed via npm and referenced from node_modules. This is the pattern blacklight uses to ship its JS and SCSS sources. This means that the generated app can ultimately choose its own bundling strategy, since all the source files are available.