Skip to content

Overriding skipLibCheck compiler option does not work #1613

Closed
@haakonflatval-cognite

Description

@haakonflatval-cognite

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/[email protected] (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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions