Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fork-ts-checker-webpack-plugin does not seem use the plugins in the tsconfig.json #755

Closed
wys-evan opened this issue Jun 30, 2022 · 1 comment
Labels

Comments

@wys-evan
Copy link

wys-evan commented Jun 30, 2022

Current behavior

webpack compiles successfully, but fails to check css module when building.

TS2307: Cannot find module './index.module.less' or its corresponding type declarations.

Expected behavior

Can successfully check the css module

Steps to reproduce the issue

  1. Project's tsconfig.json configuration :
"plugins": [{   
      "name": "typescript-plugin-css-modules",  
      "options": {  
        "customMatcher": "*.module.(c|le|sc)ss$"   
      }
    }],
  1. webpack configuration:
new ForkTsCheckerWebpackPlugin({
         async: false,
         typescript: {
           configFile: path.join(process.cwd(), 'tsconfig.json'),
           configOverwrite: {
             include: [options.packageDir],
           },
           diagnosticOptions: {
             semantic: true,
             syntactic: true,
           },
         },
       })

Issue reproduction repository

Environment

  • fork-ts-checker-webpack-plugin: 7.2.3
  • typescript: 4.7.3
  • eslint: 6.8.0
  • webpack: 5.70.0
  • os: CentOS Linux release 7.2
@wys-evan wys-evan added the bug label Jun 30, 2022
@wys-evan wys-evan reopened this Jun 30, 2022
@wys-evan wys-evan changed the title Fork-ts-checker-webpack-plugin does not seem use the plugins in the tsconfig file Fork-ts-checker-webpack-plugin does not seem use the plugins in the tsconfig.json Jun 30, 2022
@piotr-oles
Copy link
Collaborator

Unfortunately, TypeScript plugins are supported only in a language service API. I created an issue in TypeScript repo to support plugins in other APIs: microsoft/TypeScript#38736
It seems that TypeScript team has other priorities - my proposal is 2 years old and there is no update.
This plugin supports the same features as tsc - so this behaviour is sadly expected :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants