Skip to content

Commit

Permalink
feat: production 模式下避免 ForkTsCheckerWebpackPlugin 的启动
Browse files Browse the repository at this point in the history
  • Loading branch information
hikerpig committed Dec 3, 2018
1 parent 4015bbb commit eb3ffae
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/config/webpack.base.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit eb3ffae

Please sign in to comment.