From c5f749c3d4b44019e97f33e474b2dd35f90ddafe Mon Sep 17 00:00:00 2001 From: Denis Demchenko Date: Sun, 8 Jul 2018 14:40:48 +0300 Subject: [PATCH] Trying to include needed polyfills into the build --- .babelrc | 10 +++++++++- package-lock.json | 10 +++++----- package.json | 1 + webpack.config.js | 2 +- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.babelrc b/.babelrc index 3bc95d4..6099f19 100644 --- a/.babelrc +++ b/.babelrc @@ -1,5 +1,13 @@ { - "presets": ["env"], + "presets": [["env", { + "useBuiltIns": true, + "modules": "umd", + "targets": { + "ie": "8", + "browsers": ">2%" + }, + "debug": true + }]], "plugins": [ "add-module-exports" ], diff --git a/package-lock.json b/package-lock.json index c94a14a..4c4cf23 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7578,7 +7578,7 @@ "dev": true, "requires": { "babel-runtime": "6.26.0", - "core-js": "2.5.3", + "core-js": "2.5.7", "regenerator-runtime": "0.10.5" }, "dependencies": { @@ -7588,7 +7588,7 @@ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "dev": true, "requires": { - "core-js": "2.5.3", + "core-js": "2.5.7", "regenerator-runtime": "0.11.1" }, "dependencies": { @@ -7601,9 +7601,9 @@ } }, "core-js": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz", - "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=", + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==", "dev": true }, "regenerator-runtime": { diff --git a/package.json b/package.json index a871212..5bd97c6 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "babel-loader": "^7.1.5", "babel-plugin-add-module-exports": "^0.3.1", "babel-plugin-istanbul": "^4.1.6", + "babel-polyfill": "^6.26.0", "babel-preset-env": "^1.7.0", "babel-register": "^6.26.0", "coveralls": "^3.0.2", diff --git a/webpack.config.js b/webpack.config.js index 234f575..42a7201 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -3,7 +3,7 @@ const path = require('path'); module.exports = { mode: 'production', // "production" | "development" | "none" // Chosen mode tells webpack to use its built-in optimizations accordingly. - entry: './src/bowser.js', // string | object | array + entry: ['./src/bowser.js'], // string | object | array // defaults to ./src // Here the application starts executing // and webpack starts bundling