From eefa687832949d86a7b954efbcd5d20d87900120 Mon Sep 17 00:00:00 2001 From: Ganesh Pawar Date: Tue, 29 Dec 2020 15:26:28 +0530 Subject: [PATCH] run-dev: Suppress the notices made by third-party tools. This limits the `run-dev.py` startup output. And made the terminal message a bit more clear about accessing the server. Fixes #16846 --- tools/run-dev.py | 2 +- webpack.config.ts | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/tools/run-dev.py b/tools/run-dev.py index 85e8069c8a..f81fb44301 100755 --- a/tools/run-dev.py +++ b/tools/run-dev.py @@ -341,7 +341,7 @@ def shutdown_handler(*args: Any, **kwargs: Any) -> None: def print_listeners() -> None: external_host = os.getenv('EXTERNAL_HOST', 'localhost') - print(f"\nStarting Zulip on {CYAN}http://{external_host}:{proxy_port}/{ENDC}. Internal ports:") + print(f"\nStarting Zulip on:\n\n\t{CYAN}http://{external_host}:{proxy_port}/{ENDC}\n\nInternal ports:") ports = [ (proxy_port, 'Development server proxy (connect here)'), (django_port, 'Django'), diff --git a/webpack.config.ts b/webpack.config.ts index e712b6458c..b756a26555 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -224,6 +224,16 @@ export default (_env: unknown, argv: {mode?: string}): webpack.Configuration[] = }, }, plugins: [ + new webpack.ProgressPlugin({ + handler(percentage) { + if (percentage === 1) { + console.log( + "\u001B[34mi 「wdm」\u001B[0m:", + "Webpack compilation successful.", + ); + } + }, + }), new DebugRequirePlugin(), new BundleTracker({ filename: production @@ -256,6 +266,7 @@ export default (_env: unknown, argv: {mode?: string}): webpack.Configuration[] = }, publicPath: "/webpack/", stats: "errors-only", + noInfo: true, }, };