-
Notifications
You must be signed in to change notification settings - Fork 755
Put configuration in an initializer #345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey, great question, thanks for checking in. We used I think that's the only reason it's in I definitely agree that supporting initializer files would be a big improvement! |
Hey @rmosolgo Thanks for the reference! This helps me a great deal. It doesn't strike me as problematic that Sprockets freezes its environment in
So it should be possible to edit the I think three options look good for us:
That last one would be the absolute last point we could add the asset paths, after which Sprocket's I'll work on some code and get back to you :) |
Turns out that a before-hook for |
I like to keep my configuration as separated into relevant files as possible, that's why I would love to be able to have an
/config/initializers/react.rb
file containing thereact-rails
configuration options.However, due to the
asset_paths
being added in theconfig.before_initialize
hook of the railtie theaddon
option is ignored if it's set in an initializer instead of inapplication.rb
.Is it possible to move this asset path generation to the
after_initialize
hook, like the other stuff? I'm assuming it's not since you made a deliberate split of what goes intobefore
andafter
, but I figured I'd make sure there is a reason before I start spending time maybe doing a PR to fix it :-)The text was updated successfully, but these errors were encountered: