Use ES format for JS#8171
Merged
Merged
Conversation
0e7dacd to
0a42ee7
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8171 +/- ##
==========================================
+ Coverage 99.01% 99.03% +0.02%
==========================================
Files 162 162
Lines 4450 4458 +8
==========================================
+ Hits 4406 4415 +9
+ Misses 44 43 -1 ☔ View full report in Codecov by Sentry. |
This now supports a cssbundling-rails and jsbundling-rails setup, where the latter we'll use esbuild. This way the host app can customize the JS on their side. Discovered an issue in CI when generating the test app. Due to soft_generate method, in either condition, we need to run yarn install at both levels (root and generated app) and build both CSS and JS. The latter is just for running tests. In dev, since we've run yarn install already it's why we didn't discover any issue until running CI. That's why we always want to run yarn install at both project root and generated test app since the generated app will require files from the project root.
This is no longer needed since we now have a working dev and test setup with the NPM package with ES output format so we'll use cssbundling-rails and jsbundling-rails by default.
We no longer build JS but instead host app will compile it using jsbundling-rails with esbuild.
0a42ee7 to
049d4eb
Compare
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.
Since the host app will compile assets, no need to build JS manually anymore so Rollup can be removed. We'll only serve the ES format. Since host app will be expected to use cssbundling-rails and jsbundling-rails, they can build JS using esbuild. Although they should be able to use other libraries like shakapacker, webpack, etc. This removes the vendor based Flowbite script as it's no longer necessary. Our dev and test builds are working with this new setup.