## Current Behavior The `NxRspackAppPlugin` and `NxWebpackAppPlugin` will not provide typechecking if using TS Solution setup because it already has a typecheck target. However, this means that typechecking will not be run during serve. ## Expected Behavior Allow typechecking to run during serve even with TS Solution setup ## Related Issue(s) Fixes #29267
This commit is contained in:
parent
8dceb6c17d
commit
2dbff35de9
@ -240,8 +240,13 @@ function applyNxDependentConfig(
|
||||
plugins.push(new NxTsconfigPathsRspackPlugin({ ...options, tsConfig }));
|
||||
}
|
||||
|
||||
// New TS Solution already has a typecheck target
|
||||
if (!options?.skipTypeChecking && !isUsingTsSolution) {
|
||||
// New TS Solution already has a typecheck target but allow it to run during serve
|
||||
if (
|
||||
(!options?.skipTypeChecking && !isUsingTsSolution) ||
|
||||
(isUsingTsSolution &&
|
||||
options?.skipTypeChecking === false &&
|
||||
process.env['WEBPACK_SERVE'])
|
||||
) {
|
||||
const { TsCheckerRspackPlugin } = require('ts-checker-rspack-plugin');
|
||||
plugins.push(
|
||||
new TsCheckerRspackPlugin({
|
||||
|
||||
@ -243,8 +243,13 @@ function applyNxDependentConfig(
|
||||
plugins.push(new NxTsconfigPathsWebpackPlugin({ ...options, tsConfig }));
|
||||
}
|
||||
|
||||
// New TS Solution already has a typecheck target
|
||||
if (!options?.skipTypeChecking && !isUsingTsSolution) {
|
||||
// New TS Solution already has a typecheck target but allow it to run during serve
|
||||
if (
|
||||
(!options?.skipTypeChecking && !isUsingTsSolution) ||
|
||||
(isUsingTsSolution &&
|
||||
options?.skipTypeChecking === false &&
|
||||
process.env['WEBPACK_SERVE'])
|
||||
) {
|
||||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
||||
plugins.push(
|
||||
new ForkTsCheckerWebpackPlugin({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user