From 74271b904216377249a7d32ad4ca6078ee0a7cdd Mon Sep 17 00:00:00 2001 From: Jess Archer Date: Thu, 21 Jul 2022 11:54:04 +1000 Subject: [PATCH] Prevent console warning when Vite pings HMR --- src/index.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/index.ts b/src/index.ts index 78c6bc7..ea8bd49 100644 --- a/src/index.ts +++ b/src/index.ts @@ -184,12 +184,6 @@ function resolveLaravelPlugin(pluginConfig: Required): LaravelPlug return () => server.middlewares.use((req, res, next) => { if (req.url === '/index.html') { - server.config.logger.warn( - "\n" + colors.bgYellow( - colors.black(`The Vite server should not be accessed directly. Your Laravel application's configured APP_URL is: ${appUrl}`) - ) - ) - res.statusCode = 404 res.end(