From 68d709c15818b746b1261a8650eab13698106279 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Tue, 10 May 2022 08:15:22 -0400 Subject: [PATCH] Deploy: Use `npm run dev` instead of `npm run dist` `dev` is significantly faster than `dist`. `dist` uses a source mapping algorithm that's good for production, but much slower than the one used by `dev`. See https://github.com/guardicore/monkey/issues/1879 for more details. --- deployment_scripts/deploy_linux.sh | 2 +- deployment_scripts/deploy_windows.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment_scripts/deploy_linux.sh b/deployment_scripts/deploy_linux.sh index 930067bde..9f12cc43a 100755 --- a/deployment_scripts/deploy_linux.sh +++ b/deployment_scripts/deploy_linux.sh @@ -205,7 +205,7 @@ pushd "$ISLAND_PATH/cc/ui" || handle_error npm ci log_message "Generating front end" -npm run dist +npm run dev popd || handle_error # Making dir for binaries diff --git a/deployment_scripts/deploy_windows.ps1 b/deployment_scripts/deploy_windows.ps1 index f5d313322..1260dfafb 100644 --- a/deployment_scripts/deploy_windows.ps1 +++ b/deployment_scripts/deploy_windows.ps1 @@ -240,7 +240,7 @@ function Deploy-Windows([String] $monkey_home = (Get-Item -Path ".\").FullName, "Updating npm" Push-Location -Path (Join-Path -Path $monkey_home -ChildPath $MONKEY_ISLAND_DIR | Join-Path -ChildPath "\cc\ui") & npm update - & npm run dist + & npm run dev Pop-Location # Create infection_monkey/bin directory if not already present