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

Overriding skipLibCheck compiler option does not work #1613

Closed
haakonflatval-cognite opened this issue Jun 12, 2023 · 4 comments
Closed

Overriding skipLibCheck compiler option does not work #1613

haakonflatval-cognite opened this issue Jun 12, 2023 · 4 comments

Comments

@haakonflatval-cognite
Copy link
Contributor

haakonflatval-cognite commented Jun 12, 2023

Duplicates #1247

Expected Behaviour

Compiler options specified in tsconfig.json (or options.compiler field in the Webpack config object) should override the defaults specified in ts-loader. In particular, the user should be able to set the skipLibCheck field to be false, although it is given the default value true in compilerSetup.ts.

Actual Behaviour

Setting skipLibCheck to false in either tsconfig.json or options in the Webpack config does not override the default value.

Steps to Reproduce the Problem

  • In a Webpack+ts-loader project, use a dependency which will create an error if the Lib Check is not skipped. One example of such a dependency is @cognite/reveal@4.3.1 (note the exact patch version).
  • Make sure skipLibCheck is false in tsconfig.json.
  • Compile. If the lib check was performed, the build should fail, complaining about some missing type. With current behavior, build succeeds.
  • Modify node_modules/ts-loader/dist/compilerSetup.js so that skipLibCheck is false. Compile again
  • The build fails, as expected

Location of a Minimal Repository that Demonstrates the Issue.

Can provide upon request

@haakonflatval-cognite
Copy link
Contributor Author

@johnnyreilly Do you have time to address this?

@johnnyreilly
Copy link
Member

Would you like to submit a PR and I'll take a look?

@haakonflatval-cognite
Copy link
Contributor Author

@johnnyreilly Sure, I've submitted a PR now: #1617

@haakonflatval-cognite
Copy link
Contributor Author

Fixed in #1617

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

No branches or pull requests

2 participants