Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-transform-rax2react

Package Overview
Dependencies
Maintainers
2
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-rax2react

Transfrom rax base component to react base.

  • 2.3.12
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
57
increased by3.64%
Maintainers
2
Weekly downloads
 
Created
Source

babel-plugin-transform-rax-to-react

transfrom rax base component to react base

This plugin will transform rax E6 module to react.

attention

  1. react base module will not be transformed.

  2. rax's third party modules should provider src folder to build react version which like nuke did

  3. 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].

usage

Add this plugin at .babelrc or babel-loader's options like below:

step1

babel-plugin-transform-rax2react should be the first plugin of babel plugin setting.

.babelrc:

{
  "presets": ["es2015", "rax"],
  "plugins": ["transform-rax2react"]
}

step2

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/",
     ...
}

todo

针对表达式展开 JSXSpreadAttribute 需要对待展开的内容包装方法,当待展开属性包含style时包裹adjust函数。

FAQs

Package last updated on 26 Sep 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc