Performs the following codemod:
- if (module.hot) {
- // any code inside the if statement
- }
To run, execute the following command:
npx jscodeshift <GLOB> -t https://gist.githubusercontent.com/macklinu/8c3fee395bfc13b1e6afaa1221d0106a/raw/43e1fdeb996db39099d133ac74cadd60daab3d6a/remove-module-hot.js
Replace <GLOB>
with a glob of source files you'd like to modify, like src/**/*.js
.