From eb3ffaea37edc1e575e0ea3bc89483f22ea0e32b Mon Sep 17 00:00:00 2001 From: hikerpig Date: Mon, 3 Dec 2018 15:29:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20production=20=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=B8=8B=E9=81=BF=E5=85=8D=20ForkTsCheckerWebpackPlugin=20?= =?UTF-8?q?=E7=9A=84=E5=90=AF=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/webpack.base.config.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/config/webpack.base.config.ts b/src/config/webpack.base.config.ts index f0415e6..21e3b9b 100644 --- a/src/config/webpack.base.config.ts +++ b/src/config/webpack.base.config.ts @@ -81,12 +81,16 @@ export function getBaseConfig(options: ConfigOptions.options) { maxAssetSize: 1024 * 300, hints: isProd ? 'warning' : false }, - plugins: (isProd ? [] : [new FriendlyErrorsPlugin()]).concat([ + plugins: ( + isProd ? [] : [ + new FriendlyErrorsPlugin(), + new ForkTsCheckerWebpackPlugin({ + vue: true, // 开启以检测 .vue 文件中的类型错误 + ignoreDiagnostics: [2339] + }), + ] + ).concat([ new VueLoaderPlugin(), - new ForkTsCheckerWebpackPlugin({ - vue: true, // 开启以检测 .vue 文件中的类型错误 - ignoreDiagnostics: [2339] - }), makeHappyPack('ts', [ { loader: 'ts-loader',