Skip to content

Commit

Permalink
feat: support custom babel plugins (@alpha)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuslundgard committed Jan 4, 2023
1 parent d44f59d commit 38062c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/node/core/config/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {type PluginItem as BabelPluginItem} from '@babel/core'
import {type Plugin as RollupPlugin} from 'rollup'

// re-export
Expand Down Expand Up @@ -65,6 +66,10 @@ export interface TSDocCustomTag {

/** @public */
export interface PkgConfigOptions {
/** @alpha */
babel?: {
plugins?: BabelPluginItem[] | null | undefined
}
bundles?: PkgBundle[]
/** @alpha */
define?: Record<string, string | number | boolean | undefined | null>
Expand Down
1 change: 1 addition & 0 deletions src/node/tasks/rollup/resolveRollupConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export function resolveRollupConfig(
}),
getBabelOutputPlugin({
babelrc: false,
plugins: config?.babel?.plugins,
presets: [
[
'@babel/preset-env',
Expand Down

0 comments on commit 38062c5

Please sign in to comment.