Skip to content

Commit fe26c2a

Browse files
authored
Added alias option to BundleTaskParameters (#68)
* Added alias option to BundleTaskParameters * Change files
1 parent 32273f8 commit fe26c2a

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "minor",
3+
"comment": "Added alias option to BundleTaskParameters",
4+
"packageName": "@minecraft/core-build-tasks",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}

tools/core-build-tasks/src/tasks/bundle.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ export type BundleTaskParameters = {
2929

3030
/** Strip out statements with these labels. Documentation: https://esbuild.github.io/api/#drop-labels */
3131
dropLabels?: string[];
32+
33+
/** This feature lets you substitute one package (key) for another (value) when bundling. */
34+
alias?: Record<string, string>;
3235
};
3336

3437
export type PostProcessOutputFilesResult = {
@@ -119,6 +122,7 @@ export function bundleTask(options: BundleTaskParameters): ReturnType<typeof par
119122
external: options.external,
120123
write: !isRequiredToMakeChanges,
121124
dropLabels: options.dropLabels,
125+
alias: options.alias,
122126
});
123127

124128
if (buildResult.errors.length === 0) {

0 commit comments

Comments
 (0)