diff --git a/.babelrc b/.babelrc index 8457b7710..8362ed5a0 100644 --- a/.babelrc +++ b/.babelrc @@ -3,7 +3,13 @@ "react", ["env",{ "targets": { - "browsers": ["last 5 versions", "safari >= 11"], + "browsers": [ + "last 5 versions", + "FireFox >= 44", + "Safari >= 7", + "Explorer 11", + "last 4 Edge versions" + ], "loose": true } }], diff --git a/package.json b/package.json index 5248eb58b..9ecd3ae2f 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,7 @@ "babel-plugin-flow-runtime": "0.11.1", "babel-plugin-transform-decorators-legacy": "1.3.4", "babel-plugin-transform-runtime": "6.23.0", + "babel-polyfill": "^6.26.0", "babel-preset-env": "1.5.2", "babel-preset-flow": "6.23.0", "babel-preset-react": "6.24.1", diff --git a/tools/webpack.config.js b/tools/webpack.config.js index 53939a0c7..c2823fb37 100644 --- a/tools/webpack.config.js +++ b/tools/webpack.config.js @@ -86,7 +86,7 @@ module.exports = { ], }, - devtool: isDev ? 'source-map' : 'eval', + devtool: isDev ? 'source-map' : false, stats: { children: false, diff --git a/tools/webpack.prod.config.babel.js b/tools/webpack.prod.config.babel.js index 8205337d5..0da8d1d95 100644 --- a/tools/webpack.prod.config.babel.js +++ b/tools/webpack.prod.config.babel.js @@ -8,7 +8,7 @@ const merge = require('webpack-merge'); const prodConf = { entry: { - main: `${env.SRC_ROOT}/webui/src/index.js`, + main: ['babel-polyfill', `${env.SRC_ROOT}/webui/src/index.js`], }, module: { diff --git a/yarn.lock b/yarn.lock index f686cc464..8ec4e015d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -867,6 +867,14 @@ babel-polyfill@6.23.0, babel-polyfill@^6.23.0: core-js "^2.4.0" regenerator-runtime "^0.10.0" +babel-polyfill@^6.26.0: + version "6.26.0" + resolved "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153" + dependencies: + babel-runtime "^6.26.0" + core-js "^2.5.0" + regenerator-runtime "^0.10.5" + babel-preset-env@1.5.2: version "1.5.2" resolved "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.5.2.tgz#cd4ae90a6e94b709f97374b33e5f8b983556adef" @@ -957,6 +965,13 @@ babel-runtime@6.23.0, babel-runtime@6.x, babel-runtime@^6.18.0, babel-runtime@^6 core-js "^2.4.0" regenerator-runtime "^0.10.0" +babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.25.0, babel-template@^6.3.0, babel-template@^6.7.0: version "6.25.0" resolved "https://registry.npmjs.org/babel-template/-/babel-template-6.25.0.tgz#665241166b7c2aa4c619d71e192969552b10c071" @@ -1760,6 +1775,10 @@ core-js@^2.4.0: version "2.4.1" resolved "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e" +core-js@^2.5.0: + version "2.5.1" + resolved "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz#ae6874dc66937789b80754ff5428df66819ca50b" + core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -5636,10 +5655,14 @@ regenerate@^1.2.1: version "1.3.2" resolved "https://registry.npmjs.org/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" -regenerator-runtime@^0.10.0: +regenerator-runtime@^0.10.0, regenerator-runtime@^0.10.5: version "0.10.5" resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" +regenerator-runtime@^0.11.0: + version "0.11.0" + resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz#7e54fe5b5ccd5d6624ea6255c3473be090b802e1" + regenerator-transform@0.9.11: version "0.9.11" resolved "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.9.11.tgz#3a7d067520cb7b7176769eb5ff868691befe1283"