From 419efeb23cffaea45c9e79d94c94118e92d7ceb8 Mon Sep 17 00:00:00 2001 From: EnixCoda Date: Sat, 2 Mar 2019 16:37:08 +0800 Subject: [PATCH] build: do type check How could babel give up on this --- package.json | 1 + webpack.config.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/package.json b/package.json index 8f1148b..fa6320a 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "eslint": "^5.15.0", "eslint-plugin-babel": "^5.1.0", "file-loader": "^3.0.1", + "fork-ts-checker-webpack-plugin": "^0.5.2", "fsevents": "^1.2.4", "json-loader": "^0.5.7", "less": "^3.9.0", diff --git a/webpack.config.js b/webpack.config.js index 5d860cd..0e1e41d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,5 +1,6 @@ const webpack = require('webpack') const CopyWebpackPlugin = require('copy-webpack-plugin') +const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin') const TerserPlugin = require('terser-webpack-plugin'); const path = require('path') @@ -17,6 +18,7 @@ const plugins = [ to: 'icons/[name].[ext]', }, ]), + new ForkTsCheckerWebpackPlugin(), new webpack.SourceMapDevToolPlugin({}), ]