From f272c608b8dfbd1c7263d8b60cea7c85d5f05c49 Mon Sep 17 00:00:00 2001 From: Emma Segal-Grossman Date: Tue, 28 Nov 2023 11:33:19 -0500 Subject: [PATCH] Fix failing builds on main (btrix-microk8s-test) (#1413) Because tests aren't meant to be run on the CI builder, testing dependencies aren't installed. `fork-ts-checker-webpack-plugin` still was trying to type-check the test files though, and wasn't finding the types for them. This changes the `fork-ts-checker-webpack-plugin` config to ignore test files entirely. Tested by manually in Docker with `scripts/build-frontend.sh`. Thanks for your help @tw4l! Fixes build regression introduced in https://github.com/webrecorder/browsertrix-cloud/pull/1407 --- frontend/webpack.config.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/webpack.config.js b/frontend/webpack.config.js index d11580cf..ad2ddfd6 100644 --- a/frontend/webpack.config.js +++ b/frontend/webpack.config.js @@ -65,6 +65,7 @@ const version = (() => { return packageJSON.version; })(); +/** @type {import('webpack').Configuration} */ const main = { entry: "./src/index.ts", output: { @@ -125,7 +126,9 @@ const main = { maxChunks: 12, }), - new ForkTsCheckerWebpackPlugin(), + new ForkTsCheckerWebpackPlugin({ + typescript: { configOverwrite: { exclude: ["**/*.test.ts"] } }, + }), new HtmlWebpackPlugin({ template: "src/index.ejs",