Skip to content

Fast refresh sometimes does not work #37983

Answered by kota65535
kota65535 asked this question in Help
Discussion options

You must be logged in to vote

I figured out the problem.
This is because of not Gatsby but the out-of-date gatsby-plugin-typescript-checker. Unfortunately, this plugin is not maintained for 4 years.

Instead of using it, I directly added the latest fork-ts-checker-webpack-plugin as a dependency and then modified gatsby-node.ts as follows:

import { GatsbyNode } from "gatsby"
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin')

export const onCreateWebpackConfig: GatsbyNode["onCreateWebpackConfig"] = async ({ actions }, options) => {
    plugins: [
      new ForkTsCheckerWebpackPlugin()
    ],
  })
}

I think this suggestion should be noted in the type-checking section of gatsby-plugin-typescript…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@kota65535
Comment options

@kota65535
Comment options

@kota65535
Comment options

Answer selected by kota65535
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants