## 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 }));
|
plugins.push(new NxTsconfigPathsRspackPlugin({ ...options, tsConfig }));
|
||||||
}
|
}
|
||||||
|
|
||||||
// New TS Solution already has a typecheck target
|
// New TS Solution already has a typecheck target but allow it to run during serve
|
||||||
if (!options?.skipTypeChecking && !isUsingTsSolution) {
|
if (
|
||||||
|
(!options?.skipTypeChecking && !isUsingTsSolution) ||
|
||||||
|
(isUsingTsSolution &&
|
||||||
|
options?.skipTypeChecking === false &&
|
||||||
|
process.env['WEBPACK_SERVE'])
|
||||||
|
) {
|
||||||
const { TsCheckerRspackPlugin } = require('ts-checker-rspack-plugin');
|
const { TsCheckerRspackPlugin } = require('ts-checker-rspack-plugin');
|
||||||
plugins.push(
|
plugins.push(
|
||||||
new TsCheckerRspackPlugin({
|
new TsCheckerRspackPlugin({
|
||||||
|
|||||||
@ -243,8 +243,13 @@ function applyNxDependentConfig(
|
|||||||
plugins.push(new NxTsconfigPathsWebpackPlugin({ ...options, tsConfig }));
|
plugins.push(new NxTsconfigPathsWebpackPlugin({ ...options, tsConfig }));
|
||||||
}
|
}
|
||||||
|
|
||||||
// New TS Solution already has a typecheck target
|
// New TS Solution already has a typecheck target but allow it to run during serve
|
||||||
if (!options?.skipTypeChecking && !isUsingTsSolution) {
|
if (
|
||||||
|
(!options?.skipTypeChecking && !isUsingTsSolution) ||
|
||||||
|
(isUsingTsSolution &&
|
||||||
|
options?.skipTypeChecking === false &&
|
||||||
|
process.env['WEBPACK_SERVE'])
|
||||||
|
) {
|
||||||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
||||||
plugins.push(
|
plugins.push(
|
||||||
new ForkTsCheckerWebpackPlugin({
|
new ForkTsCheckerWebpackPlugin({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user