when I use the craco, and I write these code in the craco.config.js
module.exports = () => {
return {
plugins: [{
plugin: FastRefreshCracoPlugin
}],
};
};
And I write these in my app.js.
import { hot } from 'react-hot-loader'
...
export default hot(module)(App)
And these in my index.js
import React from 'react'
import ReactDOM from 'react-dom'
import App from './App'
ReactDOM.render(<App/>, document.getElementById('root'))
The browser shows these. Failed to compile. Module parse failed: Identifier 'currentExports' has already been declared (95:6) src/index.js 95:6 File was processed with these loaders:
const currentExports = react_refresh_utils.getModuleExports(module.id); | react_refresh_utils.registerExportsForReactRefresh(currentExports, module.id); |