Skip to content

Commit

Permalink
refactor: lazily load fork ts checker
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Jun 26, 2023
1 parent 6e1b5c3 commit 2214264
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/compiler/defaults/webpack-defaults.ts
@@ -1,4 +1,3 @@
import ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
import { join } from 'path';
import { TsconfigPathsPlugin } from 'tsconfig-paths-webpack-plugin';
import { defaultConfiguration } from '../../configuration/defaults';
Expand Down Expand Up @@ -92,6 +91,9 @@ export const webpackDefaultsFactory = (
};

if (!isPluginRegistered) {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');

webpackConfiguration.plugins!.push(
new ForkTsCheckerWebpackPlugin({
typescript: {
Expand Down

0 comments on commit 2214264

Please sign in to comment.