Skip to content

Commit 1ad83b4

Browse files
committed
Include react-rails settings in the sprockets version
1 parent 67e8ffa commit 1ad83b4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/react/rails/railtie.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ class Railtie < ::Rails::Railtie
3838

3939
app.config.assets.paths << root_path.join('lib/assets/react-source/').join(directory).to_s
4040
app.config.assets.paths << root_path.join('lib/assets/javascripts/').to_s
41+
42+
app.assets.version = [
43+
app.assets.version,
44+
"react-#{directory}",
45+
].compact.join('-')
4146
end
4247

4348
config.after_initialize do |app|

0 commit comments

Comments
 (0)