Browse Source

perf: optimize build process for parallel execution (#1801)

KJ7LNW 11 months ago
parent
commit
418c15d416
3 changed files with 7 additions and 3 deletions
  1. 3 2
      package.json
  2. 3 1
      webview-ui/package.json
  3. 1 0
      webview-ui/vite.config.ts

+ 3 - 2
package.json

@@ -274,8 +274,9 @@
 		}
 	},
 	"scripts": {
-		"build": "npm run build:webview && npm run vsix",
+		"build": "npm run vsix",
 		"build:webview": "cd webview-ui && npm run build",
+		"build:esbuild": "node esbuild.js --production",
 		"compile": "tsc -p . --outDir out && node esbuild.js",
 		"install:all": "npm install npm-run-all && npm run install:_all",
 		"install:_all": "npm-run-all -p install-*",
@@ -293,7 +294,7 @@
 		"check-types:webview": "cd webview-ui && npm run check-types",
 		"check-types:e2e": "cd e2e && npm run check-types",
 		"check-types:benchmark": "cd benchmark && npm run check-types",
-		"package": "npm run build:webview && npm run check-types && npm run lint && node esbuild.js --production",
+		"package": "npm-run-all -p build:webview build:esbuild check-types lint",
 		"pretest": "npm run compile",
 		"dev": "cd webview-ui && npm run dev",
 		"test": "npm-run-all -p test:*",

+ 3 - 1
webview-ui/package.json

@@ -9,7 +9,9 @@
 		"check-types": "tsc",
 		"test": "jest",
 		"dev": "vite",
-		"build": "tsc -b && vite build",
+		"tsc": "tsc -b",
+		"vite-build": "vite build",
+		"build": "npm-run-all -p tsc vite-build",
 		"preview": "vite preview",
 		"storybook": "storybook dev -p 6006",
 		"build-storybook": "storybook build",

+ 1 - 0
webview-ui/vite.config.ts

@@ -14,6 +14,7 @@ export default defineConfig({
 	},
 	build: {
 		outDir: "build",
+		reportCompressedSize: false,
 		rollupOptions: {
 			output: {
 				entryFileNames: `assets/[name].js`,