From 1e06b870c0280c1b2ced44dc21c947925893122f Mon Sep 17 00:00:00 2001 From: Stepan Kuzmin Date: Sat, 9 Jul 2022 15:20:59 +0300 Subject: [PATCH] fix: revert transform runtime and bundle babel helpers (#390) --- .babelrc | 6 +----- package.json | 2 -- rollup.config.js | 10 ++-------- yarn.lock | 12 ------------ 4 files changed, 3 insertions(+), 27 deletions(-) diff --git a/.babelrc b/.babelrc index 0999830f..3d073547 100644 --- a/.babelrc +++ b/.babelrc @@ -3,9 +3,5 @@ ["@babel/preset-env", { "bugfixes": true }], "@babel/preset-react", "@babel/preset-flow" - ], - "plugins": [ - "@babel/plugin-transform-flow-strip-types", - "@babel/plugin-transform-runtime" ] -} +} \ No newline at end of file diff --git a/package.json b/package.json index c37f9cf7..ab72464c 100644 --- a/package.json +++ b/package.json @@ -62,8 +62,6 @@ "devDependencies": { "@babel/core": "^7.18.6", "@babel/eslint-parser": "^7.18.2", - "@babel/plugin-transform-flow-strip-types": "^7.18.6", - "@babel/plugin-transform-runtime": "^7.18.6", "@babel/preset-env": "^7.18.6", "@babel/preset-flow": "^7.18.6", "@babel/preset-react": "^7.18.6", diff --git a/rollup.config.js b/rollup.config.js index 1209f3b5..accc835b 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -12,20 +12,14 @@ export default { { file: pkg.module, sourcemap: true, format: 'esm' } ], external: [ - /@babel\/runtime/, 'react', 'react-dom', 'mapbox-gl' ], plugins: [ nodeResolve(), - babel({ - babelHelpers: 'runtime', - exclude: '**/node_modules/**' - }), - commonjs({ - transformMixedEsModules: true - }), + babel({ babelHelpers: 'bundled' }), + commonjs({ transformMixedEsModules: true }), terser() ] }; diff --git a/yarn.lock b/yarn.lock index 9833a703..b58a3a3f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1000,18 +1000,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-runtime@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.18.6.tgz#77b14416015ea93367ca06979710f5000ff34ccb" - integrity sha512-8uRHk9ZmRSnWqUgyae249EJZ94b0yAGLBIqzZzl+0iEdbno55Pmlt/32JZsHwXD9k/uZj18Aqqk35wBX4CBTXA== - dependencies: - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - babel-plugin-polyfill-corejs2 "^0.3.1" - babel-plugin-polyfill-corejs3 "^0.5.2" - babel-plugin-polyfill-regenerator "^0.3.1" - semver "^6.3.0" - "@babel/plugin-transform-shorthand-properties@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz#6d6df7983d67b195289be24909e3f12a8f664dc9"