From 9347f07bc42db491592efc6502b21273a785e730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C5=A0ime=C4=8Dek?= Date: Sun, 9 Jan 2022 12:50:18 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Fixed=20nodemon=20logging?= =?UTF-8?q?=20before=20server=20start?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/cli/src/scripts/dev.ts | 4 +--- packages/cli/src/webpack/config.ts | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/cli/src/scripts/dev.ts b/packages/cli/src/scripts/dev.ts index 2ea8bd008c..787bcaf538 100644 --- a/packages/cli/src/scripts/dev.ts +++ b/packages/cli/src/scripts/dev.ts @@ -80,9 +80,7 @@ function initNodemon(compiler: MultiCompiler, args: CliArgs) { ({ emitted, name }) => emitted && !name.includes('app.server.js') ); - if (emittedAssets?.length) { - console.log('stats', stats.hasErrors()); - + if (emittedAssets?.length && serverHasStarted) { logger.info('Rebooting server due to configuration changes...'); nodemon.restart(); } diff --git a/packages/cli/src/webpack/config.ts b/packages/cli/src/webpack/config.ts index 16473a6d92..b15936ded3 100644 --- a/packages/cli/src/webpack/config.ts +++ b/packages/cli/src/webpack/config.ts @@ -446,7 +446,8 @@ export default async ( [ // Generate manifest for client static new WebpackManifestPlugin({ - fileName: `${isEsVersion ? 'js.es' : 'js'}/manifest.json` + fileName: `static/${isEsVersion ? 'js.es' : 'js'}/manifest.json`, + filter: file => /\.(js|css)$/.test(file.name) }), // Removes generated empty script caused by non-js entry points