From 141b9f655112e5db02d0061b2d31a889dbdfe081 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Mon, 20 Nov 2017 12:06:10 +0200 Subject: [PATCH] Add polyfills for IE11 --- src/polyfills.ts | 9 +++++++++ webpack.config.ts | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/polyfills.ts b/src/polyfills.ts index e69de29b..b2432991 100644 --- a/src/polyfills.ts +++ b/src/polyfills.ts @@ -0,0 +1,9 @@ +import 'core-js/es6/promise'; +import 'core-js/fn/object/assign'; +import 'core-js/fn/string/starts-with'; +import 'core-js/fn/string/ends-with'; +import 'core-js/fn/array/find'; + +import 'core-js/es6/map'; +import 'core-js/es6/set'; +import 'core-js/es6/symbol'; diff --git a/webpack.config.ts b/webpack.config.ts index 0ffc9f6c..166e3a2c 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -19,6 +19,7 @@ export default env => { ? ['./perf/index.tsx'] // perf test : [ // playground + './src/polyfills.ts', 'react-dev-utils/webpackHotDevClient', 'react-hot-loader/patch', './demo/playground/hmr-playground.tsx', @@ -34,6 +35,7 @@ export default env => { devServer: { contentBase: __dirname + '/demo', + host: '0.0.0.0', watchContentBase: true, port: 9090, stats: 'errors-only', @@ -51,7 +53,7 @@ export default env => { externals: { esprima: 'esprima', - 'node-fetch': 'fetch', + 'node-fetch': 'null', }, module: {