Fork-ts-checker-webpack-plugin: Issues are reported with changes in .d.ts files are ignored

Created on 19 Jun 2020  路  7Comments  路  Source: TypeStrong/fork-ts-checker-webpack-plugin

Current behavior

I'm using css-modules-typescript-loader to generate and update .d.ts files for .scss dynamically.
Issues are reported about all additions in .scss files after webpack started.

Expected behavior

No issues should be reported if .d.ts file is updated correctly.

Steps to reproduce the issue

  1. after webpack started, add a new css rule with class selector, then save

    .foo {
     color: red;
    }
    

    in index.scss.d.ts, a new property named foo should be added.

  2. following two ways to get issues reported

    • in index.ts, change classes.container to classes.foo. save the file and a issue will be reported.
    • add a new test.scss, add a new css rule with class selector, then save.
      in index.ts, add a new import import 'test.scss', then save, a new test.scss.d.ts will be created, then change the import statement to import testClasses from 'test.scss'. save the file and a issue will be reported.

Issue reproduction repository

repo

Environment

  • fork-ts-checker-webpack-plugin: [5.0.2]
  • typescript: [3.9.5]
  • webpack: [4.43.0]
  • os: [macOS 10.15.5]
bug

All 7 comments

same problem, and I use @teamsupercell/typings-for-css-modules-loader to generate .less.d.ts

You could ask the ts checker to build instead?, has a performance penalty but its a good alternative for now.

...
      new ForkTsCheckerWebpackPlugin({
        typescript: {
          build: true,
        },
      }),

I鈥檝e released a new version on the alpha channel with a new watch architecture. Could you test if it solves your issue? (6.0.0-alpha.1)

solved it for me (confirmed it didn't work on 5.0 but worked successfully on the 6.0 alpha)

@piotr-oles Sorry for late reply. It does work now.

I'm closing this issue, as releasing it as a stable version is a matter of few days :)

Amazing work @piotr-oles 馃帀 looking forward to this release 馃帀

Was this page helpful?
0 / 5 - 0 ratings