freerange / jam-coop

A platform co-operative for musicians and fans
https://jam.coop
GNU Affero General Public License v3.0
54 stars 2 forks source link

Long initial delay when e.g. starting a Rails console #129

Open floehopper opened 8 months ago

floehopper commented 8 months ago

When I was investigating how the browserlist warning that I fixed in https://github.com/freerange/music-coop/commit/35de739214c29b3958f260b70e1370d2cfb0a2e7, I seem to remember being surprised about the scenarios in which tailwindcss-rails recompiles assets. I have a feeling this is what's happening when you open a Rails console and maybe other Rails/Rake tasks...?

floehopper commented 7 months ago

As I said above, I suspect this is related to the tailwindcss-rails gem. However, I recently came across this useful write-up about assets in a modern Rails app by @rgarner which mentions something that might be somewhat related:

We used to use jsbundling-rails and cssbundling-rails with the esbuild opinion. We no longer do this. This is mostly because both those gems now indiscriminately enhance the spec:prepare rake task such that CSS and JS are built even when running a single spec.