Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
react-app-rewire-hot-loader
Advanced tools
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 time?
npm install --save react-app-rewire-hot-loader
# If you don't already, you also need:
npm install --save react-app-rewired
npm install --save react-hot-loader
config-overrides.js
of the root of your project you created for react-app-rewired
add this code:const rewireReactHotLoader = require('react-app-rewire-hot-loader')
/* config-overrides.js */
module.exports = function override (config, env) {
config = rewireReactHotLoader(config, env)
return config
}
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 process.env.NODE_ENV === “development” ? hot(module)(App) : App
"scripts": {
"start": "react-app-rewired start",
"build": "react-app-rewired build",
"test": "react-app-rewired test --env=jsdom",
"eject": "react-app-rewired eject"
},
That's it, you now have hot reloads!
Licensed under the MIT License, Copyright ©️ 2017 Chris Harris. See LICENSE.md for more information.
FAQs
Add react-hot-loader to a react-app-rewired config.
The npm package react-app-rewire-hot-loader receives a total of 6,335 weekly downloads. As such, react-app-rewire-hot-loader popularity was classified as popular.
We found that react-app-rewire-hot-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.