react-app-rewire-hot-loader
See original GitHub issueHi, how to config when I use react-app-rewire-hot-loader? I tried, but didn’t work:
const path = require('path');
const rewireReactHotLoader = require('react-app-rewire-hot-loader');
const fixedHot = value => config => {
config = rewireReactHotLoader(config, process.env);
return config;
};
module.exports = {
webpack: override(
fixBabelImports('import', {
libraryName: 'antd',
libraryDirectory: 'es',
style: 'css',
}),
addWebpackAlias({
['@@']: path.resolve(__dirname, 'src/')
}),
fixedHot(),
),
devServer: function(configFunction) {
return function(proxy, allowedHost) {
const config = configFunction(proxy, allowedHost);
config.hot = true;
return config;
}
}
};
Issue Analytics
- State:
- Created 5 years ago
- Comments:9
Top Results From Across the Web
react-app-rewire-hot-loader
Start using react-app-rewire-hot-loader in your project by running `npm i react-app-rewire-hot-loader`. There are 8 other projects in the ...
Read more >cdharris/react-app-rewire-hot-loader
Add the react-hot-loader to your create-react-app app via react-app-rewired . Because who wants their app, state, and styles automatically reloading all the ...
Read more >Hot Reloading in Create React App Without Ejecting
The react-hot-loader Way. You can “rewire” Create React App without ejecting, which will allow you to enable real hot module reloading.
Read more >react-app-rewire-hot-loader examples
Learn how to use react-app-rewire-hot-loader by viewing and forking example apps that make use of react-app-rewire-hot-loader on CodeSandbox.
Read more >Stateful Hot Module Replacement with create-react-app v3
React -app-rewired allows you to implement small variations to CRA's default babel configuration, while still being able to merge back in future ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@GloriaCHL @alexkreidler
I get this solution, and it’s work for me !
Other steps: http://npm.taobao.org/package/react-app-rewire-hot-loader
I don’t know why but the
env
in @MeetzhDing seems to beundefined
. And I foundmode
insideconfig
. This code works for me: