Skip to content

Commit

Permalink
append output format to bundle name
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholas-codecov committed Dec 14, 2023
1 parent acba306 commit 4f9e05b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ export const rollupBundleAnalysisPlugin: BundleAnalysisUploadPlugin = ({
return;
}

// append bundle output format to bundle name
output.bundleName = `${userOptions.bundleName}-${options.format}`;

if (options.name && options.name !== "") {
output.bundleName = `${userOptions.bundleName}-${options.name}`;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export const viteBundleAnalysisPlugin: BundleAnalysisUploadPlugin = ({
return;
}

// append bundle output format to bundle name
output.bundleName = `${userOptions.bundleName}-${options.format}`;

// add in bundle name if present
if (options.name && options.name !== "") {
output.bundleName = `${userOptions.bundleName}-${options.name}`;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ export const webpackBundleAnalysisPlugin: BundleAnalysisUploadPlugin = ({
return;
}

if (typeof compilation.outputOptions.chunkFormat === "string") {
output.bundleName = `${userOptions.bundleName}-${compilation.outputOptions.chunkFormat}`;
}

if (compilation.name && compilation.name !== "") {
output.bundleName = `${userOptions.bundleName}-${compilation.name}`;
}
Expand Down

0 comments on commit 4f9e05b

Please sign in to comment.