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
I don't know the correct way to go about this, but I need to load a bundled file through sprockets for a gem to use it (react-rails). Basically, I expose a module globally in a pack (using webpack's library output option) and I need to point react-rails to this bundle to pre-render some stuff with ExecJS, but react-rails loads js through sprockets, right now if I manually add the pack to the assets path in the assets initialisers, I can get the server-side renderer to load it through sprockets, but it doesn't detect changes to it, which causes the server rendered version to be out of sync with the client side version (which loads the bundle with the javascript_pack helper). I can only assume this is going to be an even bigger problem in production. What I guess I need is an interface for sprockets to load these bundles, does that make sense as part of this gem?
For reference, have a look at the repo I'm working on, it is thoroughly explained in the README.
The text was updated successfully, but these errors were encountered:
I don't know the correct way to go about this, but I need to load a bundled file through
sprockets
for agem
to use it (react-rails
). Basically, I expose a module globally in apack
(usingwebpack
's library output option) and I need to pointreact-rails
to this bundle to pre-render some stuff with ExecJS, butreact-rails
loadsjs
through sprockets, right now if I manually add the pack to the assets path in the assets initialisers, I can get the server-side renderer to load it through sprockets, but it doesn't detect changes to it, which causes the server rendered version to be out of sync with the client side version (which loads the bundle with thejavascript_pack
helper). I can only assume this is going to be an even bigger problem in production. What I guess I need is an interface for sprockets to load these bundles, does that make sense as part of this gem?For reference, have a look at the repo I'm working on, it is thoroughly explained in the README.
The text was updated successfully, but these errors were encountered: