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

How to enable HMR in CRA using typescript #1279

Closed
29x10 opened this issue Jul 2, 2019 · 2 comments
Closed

How to enable HMR in CRA using typescript #1279

29x10 opened this issue Jul 2, 2019 · 2 comments

Comments

@29x10
Copy link

29x10 commented Jul 2, 2019

If you are reporting a bug or having an issue setting up React Hot Loader, please fill in below. For feature requests, feel free to remove this template entirely.

Description

I am using CRA v3.0.1. react-hot-loader works with CRA and customize-cra, but when I use CRA with typescript, I could not find a way to put those config(https://github.com/gaearon/react-hot-loader#typescript) after I run eject. I have no idea how to fix it.

Expected behavior

Actual behavior

React-Hot-Loader: react-hot-dom patch is not detected. React 16.6+ features may not work.

Environment

React Hot Loader version: 4.11.1

Run these commands in the project folder and fill in their results:

  1. node -v: v10.15.3
  2. npm -v: 6.9.0

Then, specify:

  1. Operating system: RHEL 6
  2. Browser and version: Chrome 75.0.3770.80

Reproducible Demo

Please take the time to create a new project that reproduces the issue.

You can copy your project that experiences the problem and start removing things until you’re left with the minimal reproducible demo. This helps contributors, and you might get to the root of your problem during that process.

Push to GitHub and paste the link here.

@29x10
Copy link
Author

29x10 commented Jul 2, 2019

fixed by install @hot-loader/react-dom and

    addWebpackAlias(
        {
            ['react-dom']: '@hot-loader/react-dom'
        }
    ),

@29x10 29x10 closed this as completed Jul 2, 2019
@theKashey
Copy link
Collaborator

👨‍🔬 facebook/create-react-app#7227

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