From 368bbb99cd40c1899153d3ac3e40d8268e87216b Mon Sep 17 00:00:00 2001 From: Justin Grote Date: Sun, 20 Aug 2023 12:40:20 -0700 Subject: [PATCH] Move `--sourcemap` to scripts instead of `Invoke-Build` So that they're generated even when using `build-watch`. Double-checked that they're not included in the package (even though they're now generated for release configuration too). --- package.json | 2 +- vscode-powershell.build.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c8b9c77a8d..76e71c2854 100644 --- a/package.json +++ b/package.json @@ -118,7 +118,7 @@ "main": "./out/main.js", "scripts": { "lint": "eslint . --ext .ts", - "build": "esbuild ./src/main.ts --outdir=out --bundle --external:vscode --platform=node", + "build": "esbuild ./src/main.ts --outdir=out --sourcemap --bundle --external:vscode --platform=node", "build-watch": "npm run build -- --watch", "build-test": "tsc --incremental", "build-test-watch": "npm run build-test -- --watch", diff --git a/vscode-powershell.build.ps1 b/vscode-powershell.build.ps1 index 20e02f803c..3c164dc25d 100644 --- a/vscode-powershell.build.ps1 +++ b/vscode-powershell.build.ps1 @@ -101,7 +101,7 @@ task Build Restore, { # Unfortunately `esbuild` doesn't support emitting 1:1 files (yet). # https://github.com/evanw/esbuild/issues/944 switch ($Configuration) { - "Debug" { Invoke-BuildExec { & npm run build -- --sourcemap } } + "Debug" { Invoke-BuildExec { & npm run build } } "Release" { Invoke-BuildExec { & npm run build -- --minify } } } }