Skip to content

Commit 243753a

Browse files
authored
add info to disable env check to error message (#165)
1 parent 21e841a commit 243753a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,19 +236,19 @@ function ensureCommandShouldRunInEnvironment(command: 'build'|'serve', env: Reco
236236
}
237237

238238
if (typeof env.LARAVEL_VAPOR !== 'undefined') {
239-
throw Error('You should not run the Vite HMR server on Vapor. You should build your assets for production instead.');
239+
throw Error('You should not run the Vite HMR server on Vapor. You should build your assets for production instead. To disable this ENV check you may set LARAVEL_BYPASS_ENV_CHECK=1');
240240
}
241241

242242
if (typeof env.LARAVEL_FORGE !== 'undefined') {
243-
throw Error('You should not run the Vite HMR server in your Forge deployment script. You should build your assets for production instead.');
243+
throw Error('You should not run the Vite HMR server in your Forge deployment script. You should build your assets for production instead. To disable this ENV check you may set LARAVEL_BYPASS_ENV_CHECK=1');
244244
}
245245

246246
if (typeof env.LARAVEL_ENVOYER !== 'undefined') {
247-
throw Error('You should not run the Vite HMR server in your Envoyer hook. You should build your assets for production instead.');
247+
throw Error('You should not run the Vite HMR server in your Envoyer hook. You should build your assets for production instead. To disable this ENV check you may set LARAVEL_BYPASS_ENV_CHECK=1')
248248
}
249249

250250
if (typeof env.CI !== 'undefined') {
251-
throw Error('You should not run the Vite HMR server in CI environments. You should build your assets for production instead.');
251+
throw Error('You should not run the Vite HMR server in CI environments. You should build your assets for production instead. To disable this ENV check you may set LARAVEL_BYPASS_ENV_CHECK=1')
252252
}
253253
}
254254

0 commit comments

Comments
 (0)