diff --git a/packages/rollup-plugin-babel/src/index.js b/packages/rollup-plugin-babel/src/index.js index 315e69b6f..50bc6fdda 100644 --- a/packages/rollup-plugin-babel/src/index.js +++ b/packages/rollup-plugin-babel/src/index.js @@ -1,8 +1,9 @@ import { dirname } from 'path'; import { buildExternalHelpers, transform } from 'babel-core'; import { createFilter } from 'rollup-pluginutils'; +import assign from 'object-assign'; import preflightCheck from './preflightCheck.js'; -import { assign, warnOnce } from './utils.js'; +import { warnOnce } from './utils.js'; import { RUNTIME, BUNDLED, HELPERS } from './constants.js'; const keywordHelpers = [ 'typeof', 'extends', 'instanceof' ]; diff --git a/packages/rollup-plugin-babel/src/preflightCheck.js b/packages/rollup-plugin-babel/src/preflightCheck.js index 56cc9f5a5..38d0554f6 100644 --- a/packages/rollup-plugin-babel/src/preflightCheck.js +++ b/packages/rollup-plugin-babel/src/preflightCheck.js @@ -1,5 +1,5 @@ import { join } from 'path'; -import { assign } from './utils.js'; +import assign from 'object-assign'; import { transform } from 'babel-core'; import { INLINE, RUNTIME, BUNDLED } from './constants.js'; import classes from 'babel-plugin-transform-es2015-classes'; diff --git a/packages/rollup-plugin-babel/src/utils.js b/packages/rollup-plugin-babel/src/utils.js index f4cfbb6b1..5ed0f876c 100644 --- a/packages/rollup-plugin-babel/src/utils.js +++ b/packages/rollup-plugin-babel/src/utils.js @@ -1,10 +1,3 @@ -export function assign ( target, source ) { - Object.keys( source ).forEach( key => { - target[ key ] = source[ key ]; - }); - return target; -} - let warned = {}; export function warnOnce ( warn, msg ) { if ( warned[ msg ] ) return;