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
This commit is contained in:
Emma Segal-Grossman 2023-11-28 11:33:19 -05:00 committed by GitHub
parent 3d93d0a0d0
commit f272c608b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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",