mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-31 19:01:54 +02:00
Use babel-polyfill
in place of polyfill.io
CDN (#2496)
Update provides support for running the examples app on IE 11. There appeared to be a number of issues with using `polyfill.io` with slate. While trying to run the example app on IE 11, I ran into each of the following: https://github.com/Financial-Times/polyfill-service/issues/792 https://github.com/Financial-Times/polyfill-service/issues/854 https://github.com/Financial-Times/polyfill-service/issues/1341 `babel-polyfill` provides more robust support for polyfilling and will allow for better targeting of supported browser envs in the future (if desired). Also includes `element-closest` polyfill, which is necessary for using with IE 11 :(
This commit is contained in:
committed by
Ian Storm Taylor
parent
861ba522b8
commit
37bab503b4
@@ -13,7 +13,14 @@ const IS_PROD = process.env.NODE_ENV === 'production'
|
||||
const IS_DEV = !IS_PROD
|
||||
|
||||
const config = {
|
||||
entry: ['react-hot-loader/patch', './examples/index.js'],
|
||||
entry: [
|
||||
'babel-polyfill',
|
||||
// COMPAT: Missing in IE 11 and included separately because babel-polyfill does not support DOM elements:
|
||||
// https://github.com/zloirock/core-js/issues/317
|
||||
'element-closest',
|
||||
'react-hot-loader/patch',
|
||||
'./examples/index.js',
|
||||
],
|
||||
output: {
|
||||
path: path.resolve(__dirname, '../../build'),
|
||||
filename: '[name]-[hash].js',
|
||||
@@ -79,7 +86,6 @@ const config = {
|
||||
content: 'width=device-width, initial-scale=1',
|
||||
},
|
||||
],
|
||||
scripts: ['https://cdn.polyfill.io/v2/polyfill.min.js'],
|
||||
links: [
|
||||
'https://fonts.googleapis.com/css?family=Roboto:400,400i,700,700i&subset=latin-ext',
|
||||
'https://fonts.googleapis.com/icon?family=Material+Icons',
|
||||
|
Reference in New Issue
Block a user