Test with esbuild/propshaft including both Rails 7.2 and 8.0 #3360
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.
Adding esbuild to test matrix -- as long as it's with propshaft, it just passes with no code-changes on main in both Rails 7 and Rails 8, because in fact the existing propshaft_generator is really a YarnPackageGenerator -- it works with anything that wants NPM dependencies added with
yarn add
to a package.json.Apparently that includes some propshaft setups, but it also includes ESBuild setups.
I think that means it would work in Rails 7 with sprockets and esbuild as well (or any
jsbundling-rails
option usingyarn
-- that is, any butbun
: esbuild, rollup, or webpack.Before merging we can discuss at community meeting to make sure there is agreement on the project taking this on.
If we do want to merge this, I would after that try an additional suggested PR that renames PropshaftGenerator to say YarnPackageGenerator; adds explicit options to choose which kind of asset generator you want if the default guesses aren't right (say you have importmaps AND sprockets AND esbuild, it is possible!); and adds another clause to default choice too to make it easier for us to test Rails 7+sprockets+esbuild too.