TypeStrong / fork-ts-checker-webpack-plugin

Webpack plugin that runs typescript type checker on a separate process.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Building become slower when upgrade to 7.x

jonathan-chancetop opened this issue · comments

Hello guys, I'm curious that when I upgraded to 7.2.13, my building time increased from 4s to 6.6s, below is my configuration:
This is the configuration for 6.0.3

        new ForkTSCheckerPlugin({
            typescript: {
                configFile: env.tsConfig,
                mode: "write-references",
            },
            eslint: {
                files: `${env.src}/**/*.{ts,tsx}`,
                memoryLimit: 512,
            },
        }),

This is the configuration for 7.2.13:

        new ForkTSCheckerPlugin({
            typescript: {
                configFile: env.tsConfig,
                mode: "write-references",
            },
        }),

I enabled cache in webpack and ts check, I also dropped the result for the first build, so these results are all used cache.

I haven't added another eslint plugin, so I don't know why it is slower then before, especially that it now only run ts checking but both run ts checking and esling checking before.

Happening to me as well on version. Dev/watch take 10-30 seconds for a small change.

Using

  • plugin verison: 7.2.13
  • nodejs 16.17
  • webpack 5.74.0
  • ts-loader 9.3.1
  • typescript 4.8.2

Downgrading to 6.5.1 fixed issue witrh watch time take around 1 second

Hi,
@talha5389 @jonathan-chancetop Could you please check if 7.2.11 version is ok.

In my case any next re-build doubles types check time. I've found out that it breaks with version 7.2.12.

Using:

  • plugin verison: 7.2.13
  • nodejs 16.17
  • webpack 5.74.0
  • ts-loader 9.3.1
  • typescript 4.8.2

Plugin has default settings. Also instead of webpack-dev-server I'm using webpack-dev-middleware with custom express server.

If 7.2.12 change affected build speed, consider re-adding node_modules to webpack's watchOptions.ignored config: https://webpack.js.org/configuration/watch/#watchoptionsignored

@piotr-oles I can confirm that 7.2.12 seem to have performance issue fixed if I add node_modules to watchOptions.ignored

above workaround also works for 7.2.13. I have verified that.

🎉 This issue has been resolved in version 7.2.14 🎉

The release is available on:

Your semantic-release bot 📦🚀