Skip to content

Commit def9650

Browse files
committed
feat(build): ability to customize ts checker options
1 parent 0ce01e8 commit def9650

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/typescript-build/lib/module.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const consola = require('consola')
33

44
const defaults = {
55
tsConfig: undefined,
6-
typeCheck: true,
6+
typeCheck: {},
77
ignoreNotFoundWarnings: false
88
}
99

@@ -51,13 +51,13 @@ function tsModule(_moduleOptions) {
5151

5252
if (moduleOptions.typeCheck && isClient && !isModern) {
5353
const ForkTsCheckerWebpackPlugin = require(this.nuxt.resolver.resolveModule('fork-ts-checker-webpack-plugin'))
54-
config.plugins.push(new ForkTsCheckerWebpackPlugin({
54+
config.plugins.push(new ForkTsCheckerWebpackPlugin(Object.assign({
5555
vue: true,
5656
tsconfig: moduleOptions.tsConfig || path.resolve(this.options.rootDir, 'tsconfig.json'),
5757
tslint: false, // We recommend using ESLint so we set this option to `false` by default
5858
formatter: 'codeframe',
5959
logger: consola.withScope('nuxt:typescript')
60-
}))
60+
}, moduleOptions.typeCheck)))
6161
}
6262
})
6363
}

0 commit comments

Comments
 (0)