Skip to content

Commit

Permalink
fix!: only run babel if a custom babel plugin is specified
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Jan 25, 2024
1 parent 276042e commit 6436993
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
},
"dependencies": {
"@babel/core": "^7.23.7",
"@babel/preset-env": "^7.23.8",
"@babel/types": "^7.23.6",
"@microsoft/api-extractor": "^7.39.1",
"@microsoft/tsdoc-config": "^0.16.2",
Expand Down
11 changes: 6 additions & 5 deletions src/node/tasks/rollup/resolveRollupConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import path from 'path'
import {InputOptions, OutputOptions, Plugin} from 'rollup'
import esbuild from 'rollup-plugin-esbuild'

import {BuildContext, DEFAULT_BROWSERSLIST_QUERY, resolveConfigProperty} from '../../core'
import {BuildContext, resolveConfigProperty} from '../../core'
import {RollupTask, RollupWatchTask} from '../types'

export interface RollupConfig {
Expand Down Expand Up @@ -99,10 +99,11 @@ export function resolveRollupConfig(
target,
tsconfig: ctx.ts.configPath || 'tsconfig.json',
}),
getBabelOutputPlugin({
babelrc: false,
plugins: config?.babel?.plugins,
}),
Array.isArray(config?.babel?.plugins) &&
getBabelOutputPlugin({
babelrc: false,
plugins: config?.babel?.plugins,
}),
minify &&
terser({
compress: true,
Expand Down

0 comments on commit 6436993

Please sign in to comment.