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.
Fixes issue #99
Followed below steps for debugging Hotwire reloading issue
On debugging on this issue, it seems like it is due to below code added in layout
<%= turbo_refreshes_with method: :morph, scroll: :preserve %>
On commenting this line, theme is getting loaded correctly in its set mode.
Also this issue on morph kirillplatonov/hotwire-livereload#33 seems to be related.
On inspecting in browser console, it seems like at times we are facing with turbo link preload issue due to which changes does not get reflected in browser. To fix this issue I have added below code in development.rb. By adding below code it does not throw now issue of "the resource was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate
as
value and it is preloaded intentionally"config.action_view.preload_links_header = false
Referred this link for this issue https://stackoverflow.com/questions/72753525/rails-turbo-link-preload-but-not-used-within-a-few-seconds-from-the-windows/72901033#72901033