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