Skip to content
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

Fix Webpacker helpers in production env #837

Merged
merged 1 commit into from Jun 4, 2019

Conversation

dleavitt
Copy link
Contributor

Rails.configuration.assets will be undefined if asset pipeline is not being used, which leads to an error why trying to check the value of assets.compile.

This is primarily a problem when using the webpacker helpers (b/c no sprockets) and only in non-dev environments (b/c this logic gets short-circuited if there's a webpack dev server running.)

Rails.configuration.assets is referred to in one other place but it's a block that's only run in Rails 3 so presumably doesn't need to be updated.

`Rails.configuration.assets` will be undefined if asset pipeline is not being used, which leads to an error why trying to check the value of `assets.compile`.

This is primarily a problem when using the webpacker helpers (b/c no sprockets) and only in non-dev environments (b/c this logic gets short-circuited if there's a webpack dev server running.)
@unixmonkey unixmonkey merged commit 2742687 into mileszs:master Jun 4, 2019
@unixmonkey
Copy link
Collaborator

Sorry it took awhile to look at this. Thanks!

@dleavitt
Copy link
Contributor Author

dleavitt commented Jun 4, 2019

no problem, thanks for merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants