Skip to content

Commit 4f83186

Browse files
committed
perf: use built-in target option
1 parent 7a9f121 commit 4f83186

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/index.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
type OutputOptions,
99
type RolldownPluginOption,
1010
} from 'rolldown'
11-
import { transformPlugin } from 'rolldown/experimental'
1211
import { exec } from 'tinyexec'
1312
import { cleanOutDir } from './features/clean'
1413
import { copy } from './features/copy'
@@ -227,16 +226,7 @@ async function getBuildOptions(
227226
plugins.push(Unused.rolldown(unused === true ? {} : unused))
228227
}
229228
if (target) {
230-
plugins.push(
231-
transformPlugin({
232-
include: /\.[cm]?[jt]sx?$/,
233-
exclude: /\.d\.[cm]?ts$/,
234-
transformOptions: {
235-
target,
236-
},
237-
}),
238-
RuntimeHelperCheckPlugin(target),
239-
)
229+
plugins.push(RuntimeHelperCheckPlugin(target))
240230
}
241231
plugins.push(ShebangPlugin(cwd, name, isMultiFormat))
242232
}
@@ -296,6 +286,7 @@ async function getBuildOptions(
296286
name: config.globalName,
297287
sourcemap,
298288
dir: outDir,
289+
target,
299290
minify,
300291
entryFileNames,
301292
chunkFileNames,

0 commit comments

Comments
 (0)