Giter Site home page Giter Site logo

gatsby-plugin-ts-checker's People

Contributors

kevcenteno avatar renovate-bot avatar

Watchers

 avatar

gatsby-plugin-ts-checker's Issues

Type check ignores type definitions imported from separate file in develop (watch) mode

Hi, I've been using this plugin profitably for some time and it seems to work pretty well if you have type definitions in the same file that contains the React component. However, in development mode, the Gatsby watch does not take into account changes made to type definitions if they are in a separate .ts file and imported into the component file. The develop task needs to be restarted for Gatsby to take into account any change.

Is this issue related to this plugin or perhaps I should watch somewhere else?

This is my tsconfig.json:

{
  "compilerOptions": {
    "module": "commonjs",
    "target": "esnext",
    "jsx": "preserve",
    "lib": ["dom", "dom.iterable", "es2015", "es2017"],
    "strict": true,
    "noEmit": true,
    "isolatedModules": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "removeComments": false,
    "preserveConstEnums": true,
    "allowJs": true,
    "noImplicitAny": false,
  },
  "include": ["./src/**/*"]
}

My Gatsby setup is the following:

module.exports = {
  assetPrefix: `${process.env.GATSBY_ASSET_PREFIX}`,
  plugins: [
    'gatsby-plugin-typescript',
    'gatsby-plugin-ts-checker',
    'gatsby-plugin-eslint',
    'gatsby-plugin-styled-components',
    'gatsby-plugin-image',
    'gatsby-plugin-react-helmet',
    'gatsby-plugin-sharp',
    'gatsby-plugin-remove-trailing-slashes',
    'gatsby-transformer-sharp',
    {
      resolve: 'gatsby-source-filesystem',
      options: {
        name: 'images',
        path: './src/images/',
      },
      __key: 'images',
    },
    {
      resolve: 'gatsby-plugin-google-tagmanager',
      options: {
        id: process.env.GATSBY_GTM_ID,
        includeInDevelopment: false,
        gtmAuth: process.env.GATSBY_GTM_AUTH,
        gtmPreview: process.env.GATSBY_GTM_PREVIEW_NAME,
      },
    },
  ],
};

Hope you can help me shed some light on this issue ๐Ÿ˜Š

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.