Merge pull request #1171 from threehams/ts-check-1169

Add async TS checker to build
This commit is contained in:
hydroflame 2021-09-05 14:13:36 -04:00 committed by GitHub
commit 2874112946
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 824 additions and 16 deletions

822
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -69,6 +69,7 @@
"eslint": "^7.24.0",
"eslint-plugin-node": "^11.1.0",
"file-loader": "^1.1.11",
"fork-ts-checker-webpack-plugin": "^6.3.3",
"html-webpack-plugin": "^3.2.0",
"i18n-webpack-plugin": "^1.0.0",
"istanbul": "^0.4.5",

@ -1,8 +1,9 @@
/* eslint-disable @typescript-eslint/no-var-requires */
var path = require("path");
var webpack = require("webpack");
var MiniCssExtractPlugin = require("mini-css-extract-plugin");
var HtmlWebpackPlugin = require("html-webpack-plugin");
const path = require("path");
const webpack = require("webpack");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
module.exports = (env, argv) => {
const isDevServer = (env || {}).devServer === true;
@ -97,6 +98,14 @@ module.exports = (env, argv) => {
new MiniCssExtractPlugin({
filename: "[name].css",
}),
new ForkTsCheckerWebpackPlugin({
typescript: {
diagnosticOptions: {
semantic: true,
syntactic: true,
},
},
}),
],
target: "web",
entry: entries,