webpacker-routes 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/webpacker/routes/railtie.rb +5 -1
- data/lib/webpacker/routes/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b9e216e412483eea37a5ae199097827d51f4275767afa946a07a7ad920800e9
|
4
|
+
data.tar.gz: 6375d8519b4af4ff0f5f3674da8c97adab82170e9a1008e5da59b691c38f10d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccdd5aa3fc3d1a42f683d622cee66219db5d51830ad45dbebe47716a5110186a405ab15de3bc0c1cc5882f98f7b3ff855cb6b25702467d82b9729decfa6c5945
|
7
|
+
data.tar.gz: d382dd32aadc282089d3d9e8b742e969802bdfb49bb28d7b843c5c1c2946de3c8f9aaa3ef9465bd21ebbf8b0d81bbd3b05a7181406d17bfb2e4ea5a10e919707
|
@@ -3,7 +3,11 @@ module Webpacker
|
|
3
3
|
class Engine < ::Rails::Engine
|
4
4
|
config.after_initialize do |app|
|
5
5
|
generate = -> { Webpacker::Routes.generate(app.tap(&:reload_routes!).routes) }
|
6
|
-
|
6
|
+
if Rails::VERSION::MAJOR >= 5
|
7
|
+
app.reloader.to_run(&generate)
|
8
|
+
else
|
9
|
+
ActionDispatch::Reloader.to_prepare(&generate)
|
10
|
+
end
|
7
11
|
generate.call unless ENV['WEBPACKER_ROUTES_INSTALL'] == 'true'
|
8
12
|
end
|
9
13
|
end
|