-
Notifications
You must be signed in to change notification settings - Fork 11k
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
mix() should not throw an exception in production. #20355
Comments
/cc @JeffreyWay |
@adampatterson - FYI this is fixed in 5.5. You can backport the fix to 5.4 by reading this PR: #18481 |
@laurencei I saw that! I'm excited! |
Moving the discussion to the opened PR. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description:
First, I know that mix() is in Laravels Foundation. But I wanted feedback here first before posting this to Laravel.
I understand the value in knowing that an asset is missing and know that it can be resolved. What I am covering here is the severity of how mix() fails.
Throwing an exception over a file that might exist but didn't get versioned is a bit drastic.
We use Docker and Docker builds our assets so it's common to make a change and not re-run Mix before committing. My site will work perfectly fine without a number of included scripts that are loaded on all pages but if you throw that exception you essentially take down the entire site.
I would like to see the exception locally but all the page to function in production while possibly being broken or malfunctioning. If it's possible to send a notification or post a message to the error handler that would let sentry pick that up then that would be even better.
The other issue at least for me is that because a 500 error is thrown I have not been able to create a custom error page for it. Worked in 5.2 but not in 5.4 so our customers don't have any recourse. Again yes, we have error logging but that's not the point.
Steps To Reproduce:
{{ mix('/static/css/base-not-versioned.css')}}
The exception is thrown.
The text was updated successfully, but these errors were encountered: