TypeStrong / fork-ts-checker-webpack-plugin

Webpack plugin that runs typescript type checker on a separate process.
MIT License
1.95k stars 240 forks source link

Building become slower when upgrade to 7.x #769

Closed jonathan-chancetop closed 1 year ago

jonathan-chancetop commented 2 years ago

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.

talha5389 commented 2 years ago

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

Using

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

Krakof commented 2 years ago

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 has default settings. Also instead of webpack-dev-server I'm using webpack-dev-middleware with custom express server.

piotr-oles commented 2 years ago

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

talha5389 commented 2 years ago

@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.

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 7.2.14 :tada:

The release is available on:

Your semantic-release bot :package::rocket: