
Security News
OpenClaw Skill Marketplace Emerges as Active Malware Vector
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.
babel-plugin-mobile-optimizer-react
Advanced tools
Babel plugin that removes class methods and JSX elements based on conditions.
Babel plugin that removes class methods and JSX elements based on conditions.
Conditions are passed based on env variables which are JSX_ENV :- Remove JSX Elements matching with element name. CLASS_METHOD_ENV :- Remove class methods ending with this string
Condition is that we want to remove desktop related code when viewing the web app in a mobile device. This plugin helps to remove the code during the build time itself when a chunk is created.
Your App.js that contains this code:
export default class App extends Component {
handleClick_mobile() {
console.log("Mobile Handle Click");
}
handleClick_desktop() {
console.log("Desktop handle Click");
}
render() {
return (
<div>
<table>
<tr data-mobile onClick={this.handleClick_mobile.bind(this)}>
<td>Mobile</td>
</tr>
<tr data-desktop onClick={this.handleClick_desktop.bind(this)}>
<td>Web</td>
</tr>
</table>
</div>
);
}
}
will be transpiled to:
export default class App extends Component {
handleClick_mobile() {
console.log("Mobile Handle Click");
}
render() {
return (
<div>
<table>
<tr data-mobile onClick={this.handleClick_mobile.bind(this)}>
<td>Mobile</td>
</tr>
</table>
</div>
);
}
}
:star: this repo
MIT © SanketMaru
FAQs
Babel plugin that removes class methods and JSX elements based on conditions.
We found that babel-plugin-mobile-optimizer-react 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
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.

Security News
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.