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

Can't use --force compilerOptions when build is set to true #781

Open
benzhu56 opened this issue Oct 13, 2022 · 1 comment
Open

Can't use --force compilerOptions when build is set to true #781

benzhu56 opened this issue Oct 13, 2022 · 1 comment

Comments

@benzhu56
Copy link

First of all, this is a great plugin, appreciate the work!

Current behavior

We are setting build: true in order to leverage project references(which is working as expected). Furthermore, we want to skip the cache and force the build when building for production. I tried to add --force option to compilerOptions, but then it complains about TS5093: Compiler option '--verbose' may only be used with '--build'. Adding the build option to compilerOptions again doesn't seem to do anything either.

Expected behavior

That I can use compiler options like --force --verbose when build: true is set.
Or some workarounds that can avoid reusing the tsconfig.tsbuildinfo cache, thanks!

Steps to reproduce the issue

Set up the plugin with config as following:

var forkTsCheckerPlugin = new ForkTsCheckerWebpackPlugin({
  typescript: {
    build: true,
    configOverwrite: {
      compilerOptions: {
        force: true,
      },
    }
  }
});

Issue reproduction repository

Environment

  • fork-ts-checker-webpack-plugin: 7.2.13
  • typescript: 4.8.4
  • eslint: 8.24.0
  • webpack: 5.74.0
  • os: macOS 12.6
@benzhu56 benzhu56 added the bug label Oct 13, 2022
@piotr-oles
Copy link
Collaborator

Hi! According to tsconfig.json documentation these is no such option as force. You can use it with CLI, but not with config file. Therefore, having support for force flag is a feature request - not a bug :)

@piotr-oles piotr-oles added enhancement and removed bug labels Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants