diff --git a/src/Illuminate/Foundation/helpers.php b/src/Illuminate/Foundation/helpers.php index 205247d1226d..84f0ee6d219c 100644 --- a/src/Illuminate/Foundation/helpers.php +++ b/src/Illuminate/Foundation/helpers.php @@ -570,10 +570,12 @@ function mix($path, $manifestDirectory = '') $manifest = $manifests[$manifestPath]; if (! isset($manifest[$path])) { - throw new Exception( - "Unable to locate Mix file: {$path}. Please check your ". - 'webpack.mix.js output paths and try again.' - ); + report(new Exception("Unable to locate Mix file: {$path}. Please check your ". + 'webpack.mix.js output paths and try again.')); + + if (! app('config')->get('app.debug')) { + return $path; + } } return new HtmlString($manifestDirectory.$manifest[$path]);