Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
babel-plugin-transform-rax2react
Advanced tools
transfrom rax base component to react base
This plugin will transform rax
E6 module to react
.
react base module will not be transformed.
rax's third party modules should provider src folder to build react version which like nuke did
This plugin will not install react / react-dom / prop-types
in current workspace. You have the choice on how to deal with these dependencies [cdn,umd].
Add this plugin at .babelrc
or babel-loader's options
like below:
babel-plugin-transform-rax2react should be the first plugin of babel plugin setting.
.babelrc:
{
"presets": ["es2015", "rax"],
"plugins": ["transform-rax2react"]
}
Add babel-rax2react-polyfill
for rax special function.
webpack.config.js
entry:[require.resolve('babel-rax2react-polyfill'),index.js]
eg. How to deal with 3rd party rax modules. like nuke packages.
webpack.config.js
alias:{
"nuke-text":"nuke-text/src/",
...
}
针对表达式展开 JSXSpreadAttribute
需要对待展开的内容包装方法,当待展开属性包含style
时包裹adjust
函数。
FAQs
Transfrom rax base component to react base.
We found that babel-plugin-transform-rax2react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.