Skip to content

Commit 01589af

Browse files
committed
fix: respect outputRootDir in genBundleOutput
1 parent 2bb3dd4 commit 01589af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rollup/bundle.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const BUNDLE_FORMATS: ModuleFormat[] = [
3333

3434
export function genBundleOutput(
3535
format: ModuleFormat,
36-
{ globalNamespace, min }: RollupBundleOutputConfig,
36+
{ globalNamespace, min, outputRootDir }: RollupBundleOutputConfig,
3737
): OutputOptions[] {
3838
// https://rollupjs.org/guide/en/#outputname
3939
const name = format === "es" ? undefined : globalNamespace;
@@ -43,7 +43,7 @@ export function genBundleOutput(
4343
return minArr.map(
4444
(min): OutputOptions => ({
4545
format,
46-
file: `dist/bundle/${format}${min ? ".min" : ""}.js`,
46+
file: joinPath(outputRootDir, `${format}${min ? ".min" : ""}.js`),
4747
name,
4848
plugins: min ? [terser()] : undefined,
4949
}),

0 commit comments

Comments
 (0)