Skip to content
This repository has been archived by the owner on Aug 3, 2021. It is now read-only.

pitzcarraldo/react-polyfill

Repository files navigation

react-polyfill

Build Status npm version npm downloads

A bundle of shims and polyfills to support React and CSS3 for legacy browsers. This contains below modules.

  • compose-dataset-shim: Shims the dataset property for DOM nodes.
  • console-polyfill: Makes it safe to do console.log()-s etc always.
  • es5-shim: ECMAScript 5 compatibility shims for legacy (and modern) JavaScript engines.
  • eventsource-polyfill: Provide polyfill to support EventSource in browser where it is not available
  • modernizr: JavaScript library that detects HTML5 and CSS3 features in the user’s browser. Built with config-all.json
  • respond.js: A fast & lightweight polyfill for min/max-width CSS3 Media Queries (for IE 6-8, and more)

Usage

Browser

⚠️ React-Polyfill must be placed before any stylesheets.

<head>
...
<!--[if lte IE 8]>
<script src="//pitzcarraldo.github.io/react-polyfill/react-polyfill.min.js" charSet="UTF-8"></script>
<![endif]-->
<link href="styles.css" rel="stylesheet" charSet="UTF-8"/>
...
</head>

Webpack

React-Polyfill is just concatted JavaScript. Thus, you couldn't require or import to your module with babel-loader. Use script-loader instead.

require('script!react-polyfill');

or

import 'script!react-polyfill';

LICENSE

MIT

About

A bundle of shims and polyfills to support React and HTML5/CSS3 for legacy browsers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published