diff options
author | Vitaly Takmazov | 2018-11-11 15:56:03 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-01-13 10:37:53 +0300 |
commit | 5d01de14ee14c5f86d8f2007c68963cc1f1759ea (patch) | |
tree | 5194c18bbc18f0833604224f4bd704dba14b46c4 | |
parent | 9f1dd954d7023c6a121659d1299fb83fc117a66d (diff) |
IE compatibility
-rw-r--r-- | vnext/package.json | 3 | ||||
-rw-r--r-- | vnext/src/App.js | 3 | ||||
-rw-r--r-- | vnext/webpack.config.js | 7 | ||||
-rw-r--r-- | vnext/yarn.lock | 5 |
4 files changed, 17 insertions, 1 deletions
diff --git a/vnext/package.json b/vnext/package.json index fb787710..7f103c74 100644 --- a/vnext/package.json +++ b/vnext/package.json @@ -87,6 +87,7 @@ "react-content-loader": "^3.2.0", "react-cookies": "^0.1.0", "react-dom": "16.6.1", - "react-router-dom": "^4.3.1" + "react-router-dom": "^4.3.1", + "url-polyfill": "^1.1.0" } } diff --git a/vnext/src/App.js b/vnext/src/App.js index d4e3acfe..a74934ab 100644 --- a/vnext/src/App.js +++ b/vnext/src/App.js @@ -38,6 +38,9 @@ export default class App extends React.Component { } initES = () => { + if (!('EventSource' in window)) { + return; + } const params = { hash: this.state.visitor.hash }; let url = new URL(`https://api.juick.com/events?${qs.stringify(params)}`); this.es = new EventSource(url); diff --git a/vnext/webpack.config.js b/vnext/webpack.config.js index 821070f6..35a698e0 100644 --- a/vnext/webpack.config.js +++ b/vnext/webpack.config.js @@ -13,7 +13,14 @@ module.exports = (env, argv) => { mode: dev ? 'development' : 'production', entry: { 'Juick': [ + 'core-js/modules/es6.array.map', + 'core-js/modules/es6.object.create', + 'core-js/modules/es6.object.define-property', + 'core-js/modules/es6.object.set-prototype-of', 'core-js/modules/es6.promise', + 'core-js/modules/es6.symbol', + 'core-js/modules/web.dom.iterable', + 'url-polyfill', __dirname + '/src/index.js', __dirname + '/src/style/main.css' ] diff --git a/vnext/yarn.lock b/vnext/yarn.lock index c98b45e3..451ff08b 100644 --- a/vnext/yarn.lock +++ b/vnext/yarn.lock @@ -8690,6 +8690,11 @@ url-parse@^1.1.8, url-parse@^1.4.3: querystringify "^2.0.0" requires-port "^1.0.0" +url-polyfill@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/url-polyfill/-/url-polyfill-1.1.0.tgz#d34e1a596d954b864bc8608f84c592820df422db" + integrity sha512-QAbzqCwd84yA6VyjV30aZXla+lrRmczDurvlsVnK+tFOu677ZNGz8shcFWQRp5BF9/z7qvNiCQLqpWPtVoUEBg== + url@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" |