Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
194 changes: 194 additions & 0 deletions web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-webpack-plugin": "^5.0.2",
"fork-ts-checker-webpack-plugin": "^9.1.0",
"globals": "^16.3.0",
"html-minimizer-webpack-plugin": "^5.0.3",
"identity-obj-proxy": "^3.0.0",
Expand Down
9 changes: 8 additions & 1 deletion web/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const StylelintPlugin = require("stylelint-webpack-plugin");
const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin");
const ReactRefreshWebpackPlugin = require("@pmmmwh/react-refresh-webpack-plugin");
const ReactRefreshTypeScript = require("react-refresh-typescript");
const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
const webpack = require("webpack");

/* A standard nodejs and webpack pattern */
Expand Down Expand Up @@ -54,6 +55,9 @@ const plugins = [
// themselves and do not provide any value because there are basically just arrays of texts
exclude: /po-.*\.js$/,
}),
// run the TypeScript type checks in a parallel process (report the problems to the dev server in
// the development mode)
new ForkTsCheckerWebpackPlugin({ devServer: development }),
].filter(Boolean);

if (eslint) {
Expand Down Expand Up @@ -165,7 +169,10 @@ module.exports = {
getCustomTransformers: () => ({
before: [development && ReactRefreshTypeScript.default()].filter(Boolean),
}),
transpileOnly: development,
// skip the TypeScript type checks in the TS loader, the types are checked by the
// "fork-ts-checker-webpack-plugin" which runs the checks in parallel in a separate
// process to not block the main webpack build process
transpileOnly: true,
},
},
],
Expand Down