diff options
author | XhmikosR <xhmikosr@gmail.com> | 2020-05-26 06:14:12 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-26 06:14:12 +0300 |
commit | 340236cbe4a5bfb3fb3583f177ba7a493bb4f21c (patch) | |
tree | 6fc829896c5ee381a7457244d3d100012b5eef01 /js/tests | |
parent | c9cd3e4a083a69bcd2eefb1d1b62e6106e2ce469 (diff) |
Update to `@rollup/plugin-babel` (#30742)
Diffstat (limited to 'js/tests')
-rw-r--r-- | js/tests/integration/rollup.bundle.js | 5 | ||||
-rw-r--r-- | js/tests/karma.conf.js | 10 |
2 files changed, 6 insertions, 9 deletions
diff --git a/js/tests/integration/rollup.bundle.js b/js/tests/integration/rollup.bundle.js index d09a9dbbe2..0ac6e406ae 100644 --- a/js/tests/integration/rollup.bundle.js +++ b/js/tests/integration/rollup.bundle.js @@ -1,7 +1,7 @@ /* eslint-env node */ const resolve = require('@rollup/plugin-node-resolve') -const babel = require('rollup-plugin-babel') +const { babel } = require('@rollup/plugin-babel') module.exports = { input: 'js/tests/integration/bundle.js', @@ -12,7 +12,8 @@ module.exports = { plugins: [ resolve(), babel({ - exclude: 'node_modules/**' + exclude: 'node_modules/**', + babelHelpers: 'bundled' }) ] } diff --git a/js/tests/karma.conf.js b/js/tests/karma.conf.js index 6e1effc3a3..8281593e25 100644 --- a/js/tests/karma.conf.js +++ b/js/tests/karma.conf.js @@ -1,7 +1,7 @@ /* eslint-env node */ const path = require('path') const ip = require('ip') -const babel = require('rollup-plugin-babel') +const { babel } = require('@rollup/plugin-babel') const istanbul = require('rollup-plugin-istanbul') const resolve = require('@rollup/plugin-node-resolve') @@ -9,7 +9,6 @@ const { browsers, browsersKeys } = require('./browsers') -const babelHelpers = require('../../build/babel-helpers.js') const { env } = process const browserStack = env.BROWSER === 'true' @@ -77,11 +76,8 @@ const conf = { babel({ // Only transpile our source code exclude: 'node_modules/**', - // Include only required helpers - externalHelpersWhitelist: babelHelpers, - plugins: [ - '@babel/plugin-proposal-object-rest-spread' - ] + // Inline the required helpers in each file + babelHelpers: 'inline' }), resolve() ], |