diff --git a/.babelrc b/.babelrc index e100ece..b8ebf03 100644 --- a/.babelrc +++ b/.babelrc @@ -15,12 +15,12 @@ }, "es": { "plugins": [ - "external-helpers" + "@babel/plugin-external-helpers" ] }, "umd": { "plugins": [ - "external-helpers", + "@babel/plugin-external-helpers", [ "./modules/babel-plugin-merge-imports", { diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 2bdc1f7..5b89799 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -1,149 +1,53 @@ \ No newline at end of file diff --git a/build/util.js b/build/util.js index 610ebba..6e086ef 100644 --- a/build/util.js +++ b/build/util.js @@ -2,7 +2,7 @@ const replace = require('rollup-plugin-replace') const babel = require('rollup-plugin-babel') const resolve = require('rollup-plugin-node-resolve') const cjs = require('rollup-plugin-commonjs') -const {uglify} = require('rollup-plugin-uglify') +const { uglify } = require('rollup-plugin-uglify') function plugins (options = {}) { const plugins = [ @@ -16,24 +16,22 @@ function plugins (options = {}) { ], }), resolve({ - main: true, - module: true, - jsnext: true, + mainFields: ['module', 'main'], browser: true, }), cjs(), ] if (options.min) { - plugins.push(uglify({ - mangle: true, - sourcemap: true, - compress: { - warnings: false, - }, - output: { - preamble: options.banner, - }, - })) + plugins.push( + uglify({ + mangle: true, + sourcemap: true, + compress: true, + output: { + preamble: options.banner, + }, + }), + ) } return plugins } diff --git a/package-lock.json b/package-lock.json index 46202d0..e42f074 100644 --- a/package-lock.json +++ b/package-lock.json @@ -389,6 +389,15 @@ "integrity": "sha512-mdFqWrSPCmikBoaBYMuBulzTIKuXVPtEISFbRRVNwMWpCms/hmE2kRq0bblUHaNRKrjRlmVbx1sDHmjmRgD2Xg==", "dev": true }, + "@babel/plugin-external-helpers": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-external-helpers/-/plugin-external-helpers-7.2.0.tgz", + "integrity": "sha512-QFmtcCShFkyAsNtdCM3lJPmRe1iB+vPZymlB4LnDIKEBj2yKQLQKtoxXxJ8ePT5fwMl4QGg303p4mB0UsSI2/g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, "@babel/plugin-proposal-async-generator-functions": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz", @@ -1804,15 +1813,6 @@ "object.assign": "^4.1.0" } }, - "babel-plugin-external-helpers": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-external-helpers/-/babel-plugin-external-helpers-6.22.0.tgz", - "integrity": "sha1-IoX0iwK9Xe3oUXXK+MYuhq3M76E=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, "babel-plugin-istanbul": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-5.2.0.tgz", @@ -1825,16 +1825,6 @@ "test-exclude": "^5.2.3" } }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, "backo2": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", @@ -2908,12 +2898,6 @@ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", "dev": true }, - "core-js": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz", - "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4=", - "dev": true - }, "core-js-compat": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.2.1.tgz", @@ -9271,12 +9255,6 @@ "regenerate": "^1.4.0" } }, - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - }, "regenerator-transform": { "version": "0.14.1", "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.1.tgz", diff --git a/package.json b/package.json index 881690c..87d7833 100644 --- a/package.json +++ b/package.json @@ -40,9 +40,9 @@ }, "devDependencies": { "@babel/core": "^7.6.2", + "@babel/plugin-external-helpers": "^7.2.0", "@babel/preset-env": "^7.6.2", "babel-loader": "^8.0.6", - "babel-plugin-external-helpers": "^6.22.0", "babel-plugin-istanbul": "^5.2.0", "chai": "^4.2.0", "coveralls": "^3.0.6",