react-polyfill
v0.0.2
Published
A bundle of shims and polyfills to support React and HTML5/CSS3 for legacy browsers.
Downloads
1,104
Readme
react-polyfill
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
:warning: 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';