|
|
|
|
|
by abritinthebay
3405 days ago
|
|
It's pretty easy to do - have your build tool generate a hash of the bundle and store that (simplest way is a json file with the file:hash as a key:value, obv other ways are possible) Webpack has built in support for this as it generates chunk hashes and can output filenames with them in it, then you just get that data and do the same as above. How you put that in your Rails app is up to you - could be a simple helper like javascript_tag, that would be easy to do. Rails really didn't have any magic to the asset pipeline in that regard. |
|