Socket
Socket
Sign inDemoInstall

babel-rax2react-polyfill

Package Overview
Dependencies
2
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    babel-rax2react-polyfill

Provides polyfills necessary for rax2react


Version published
Maintainers
2
Install size
2.20 MB
Created

Readme

Source

babel-rax2react-polyfill

rax 转 react 的 polyfill,用于补充 react 高清方案,并适配 rax 特殊方法,使用方法与 babel-polyfill 一致。

npm install --save babel-polyfill

因为这是一个 polyfill (它需要在你的源代码之前运行),我们需要让它成为一个 dependency, 而不是一个 devDependency.

如果你在你的应用入口使用 ES6 的 import 语法,你需要在入口顶部通过 import 将 polyfill 引入,以确保它能够最先加载:

import 'babel-rax2react-polyfill';

或者在打包入口添加

module.exports = {
  entry: [require.resolve('babel-rax2react-polyfill'), '/path/index.js']
};

FAQs

Last updated on 26 Sep 2019

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc