Add setting switch to disable assets compilation#244
Add setting switch to disable assets compilation#244marcoroth merged 1 commit intostimulusreflex:masterfrom n-rodriguez:wip/assets
Conversation
|
Thanks @n-rodriguez! I thought we had that already, but seems like we don't! I'm wondering if we should do it like Otherwise we should probably add the option to the |
|
I'd prefer to not touch CableReady::Config so let's do it à la Turbo :) |
@n-rodriguez Do you have any specific reason for that? |
to keep things simple |
|
Actually I don't use the Maybe this is better : # config/initializers/cable_ready.rb
CableReady.configure do |config|
config.precompile_assets = false # new configuration accessor
config.on_failed_sanity_checks = :ignore
config.add_operation_name :notify
config.add_operation_name :progress_bar
endbut it may requires some tests. wdyt? |
|
@n-rodriguez I like the version where we have it in but we can also keep the For ActionText, ActionCable and ActiveStorage it makes sense that they do it that way because the already have their regular a config on |
|
One more thing: Would you mind adding it commented out to: Then we can merge this, imo 🚀 |
Like Turbo: https://github.com/hotwired/turbo-rails/blob/main/lib/turbo/engine.rb#L31 and ActionCable: https://github.com/rails/rails/blob/main/actioncable/lib/action_cable/engine.rb#L27 Useful when using Webpacker to manage static assets
Do you think it's possible to cut a new pre-release for both Ruby and JS? |
|
Yes, pre10 is going out this week! |
Thanks! |
# Type of PR Enhancement ## Description This pull request ports over the changes introduced in stimulusreflex/cable_ready#244 This allows developers to disable the assets pre-compilation step, which previously happened automatically if the gem was included and sprockets was installed in the app. If the project is using esbuild/webpack/vite it's very likely that there's no need to precompile the StimulusReflex assets in your app. ## Why should this be added So that developers can turn off the pre-compilation step if they don't ship the StimulusReflex assets via the Asset pipeline.
Like ActionCable: https://github.com/rails/rails/blob/main/actioncable/lib/action_cable/engine.rb#L27
Useful when using Webpacker to manage static assets