diff --git a/.env.example b/.env.example index f7bac5a6..6b708f29 100644 --- a/.env.example +++ b/.env.example @@ -9,6 +9,7 @@ # Be sure to disable debug at production environment! APP_DEBUG = false APP_ENV = production +WEBPACK_ENV = production # Database Configuration DB_CONNECTION = dummy diff --git a/app/helpers.php b/app/helpers.php index fc3af916..eb44268c 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -10,7 +10,7 @@ use Illuminate\Support\Str; if (! function_exists('webpack_assets')) { function webpack_assets(string $relativeUri): string { - if (app()->environment('development')) { + if (env('WEBPACK_ENV', 'production') == 'development') { // @codeCoverageIgnoreStart $host = parse_url(url('/'), PHP_URL_HOST); return "http://$host:8080/$relativeUri";