You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TL;DR - Turbo streams and webpacker not playing nicely with eachother in production, see repro for more.
I've run into an issue with turbo streams that's preventing me from using them in production on a project I've been working on and I was able to reproduce it here. I am receiving a ChunkLoadError from webpacker in production, which I tracked down to a script tag that was being added by a turbo_stream_from tag. The source of this script was packs/js/1-5ce38966547e7764d1a6.chunk.js, but this numbered pack was not showing up in the packs/manifest.json file used for uploading the necessary assets to the production CDN. Removing the import "@hotwired/turbo-rails" line (which was the solution to #48) from my application.js gets rid of this numbered pack and the script tag, but breaks the streams functionality. For more info, see the README in the reproduction repository. I have looked in a lot of different places for a solution to this issue but haven't found any useful resources so far, so if anyone knows a workaround or any idea of how to fix this it would be greatly appreciated 🙏.
The text was updated successfully, but these errors were encountered:
Update: this seems to be coming from this line, looking in my node_modules it seems the webpackChunkName comment isn't present in the source code in my node_modules folder. Explicitly adding
to my application.js seems to be a feasible work around (still need to check this will work on production) but this should be fixed in the source code itself, by ensuring this comment isn't removed when the source code is put into node_modules
TL;DR - Turbo streams and webpacker not playing nicely with eachother in production, see repro for more.
I've run into an issue with turbo streams that's preventing me from using them in production on a project I've been working on and I was able to reproduce it here. I am receiving a
ChunkLoadError
from webpacker in production, which I tracked down to ascript
tag that was being added by aturbo_stream_from
tag. The source of this script waspacks/js/1-5ce38966547e7764d1a6.chunk.js
, but this numbered pack was not showing up in thepacks/manifest.json
file used for uploading the necessary assets to the production CDN. Removing theimport "@hotwired/turbo-rails"
line (which was the solution to #48) from myapplication.js
gets rid of this numbered pack and thescript
tag, but breaks the streams functionality. For more info, see the README in the reproduction repository. I have looked in a lot of different places for a solution to this issue but haven't found any useful resources so far, so if anyone knows a workaround or any idea of how to fix this it would be greatly appreciated 🙏.The text was updated successfully, but these errors were encountered: