diff --git a/core/src/utils/transform.ts b/core/src/utils/transform.ts index 1489cfb..317b4c8 100644 --- a/core/src/utils/transform.ts +++ b/core/src/utils/transform.ts @@ -1,11 +1,12 @@ import { transform } from '@babel/standalone'; import { PluginItem } from '@babel/core'; +import removeImports from 'babel-plugin-transform-remove-imports'; import { Options } from '../'; export function babelTransform(input: string, filename: string, opts: Options = {}) { const plugins: PluginItem[] = [...(opts.babelPlugins || [])]; if (opts.removeImports) { - plugins.push(['babel-plugin-transform-remove-imports', opts.removeImports]); + plugins.push([removeImports, opts.removeImports]); } return transform(input, { filename,