From a919d18ea725e5ac87755b253629774cb181ef8e Mon Sep 17 00:00:00 2001 From: Alex Rudenko Date: Fri, 20 Jan 2023 15:12:03 +0100 Subject: [PATCH] chore: fix third_party build (#9554) The third_party folder is compiled with tsc and then rolled up in-place. This means that the next build might try to compile the file that has been rolled up leading to build errors. It seems the safest solution is to always rebuild third_party folder as the size is relatively small. --- packages/puppeteer-core/package.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/puppeteer-core/package.json b/packages/puppeteer-core/package.json index 5244f6ad51c..94c3513a16a 100644 --- a/packages/puppeteer-core/package.json +++ b/packages/puppeteer-core/package.json @@ -39,11 +39,12 @@ "build:types": "wireit", "build": "wireit", "check": "tsx tools/ensure-correct-devtools-protocol-package", - "clean": "tsc -b --clean && rimraf lib src/generated", "format:types": "wireit", "generate:package-json": "wireit", "generate:sources": "wireit", - "prepack": "wireit" + "prepack": "wireit", + "clean": "tsc -b --clean && rimraf lib src/generated", + "clean:third_party": "wireit" }, "wireit": { "prepack": { @@ -72,6 +73,9 @@ "src/generated/**" ] }, + "clean:third_party": { + "command": "rimraf lib/esm/third_party lib/cjs/third_party" + }, "build:third_party": { "command": "rollup --config rollup.third_party.config.js", "dependencies": [ @@ -129,6 +133,7 @@ "command": "tsc -b", "clean": "if-file-deleted", "dependencies": [ + "clean:third_party", "generate:sources" ], "files": [