craco-plugin-react-hot-reload

0.1.0 • Public • Published

craco-plugin-react-hot-reload

Prerequisites

  1. Install craco
  2. react-hot-reload
  3. Regarding this install proper @hot-loader/react-dom

Install

npm install craco-plugin-react-hot-reload --save-dev

Usage

  1. Add the plugin into your craco.config.js;
reactHotReloadPlugin = require('craco-plugin-react-hot-reload');

module.exports = {
    plugins: [{
        plugin: reactHotReloadPlugin
    }]
}
  1. Follow 'step 2' from https://github.com/gaearon/react-hot-loader , replicated below:
Mark your root component as hot-exported:
// App.js
import React from 'react'
import { hot } from 'react-hot-loader'
 
const App = () => <div>Hello World!</div>
 
export default hot(module)(App)

Acknowledgements

@cdharris for having created react-app-rewire-hot-loader.

License

Licensed under the MIT License, Copyright ©️ 2018 Hasan Ayan. See LICENSE.md for more information.

Package Sidebar

Install

npm i craco-plugin-react-hot-reload

Weekly Downloads

914

Version

0.1.0

License

MIT

Unpacked Size

3.51 kB

Total Files

4

Last publish

Collaborators

  • hasanayan