Skip to content

Commit

Permalink
append bundler name option if present
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholas-codecov committed Dec 14, 2023
1 parent 2da2a19 commit acba306
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export const rollupBundleAnalysisPlugin: BundleAnalysisUploadPlugin = ({
return;
}

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

const customOptions = {
moduleOriginalSize: false,
...options,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export const viteBundleAnalysisPlugin: BundleAnalysisUploadPlugin = ({
return;
}

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

const customOptions = {
moduleOriginalSize: false,
...options,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ export const webpackBundleAnalysisPlugin: BundleAnalysisUploadPlugin = ({
return;
}

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

const compilationStats = compilation.getStats().toJson({
assets: true,
chunks: true,
Expand Down

0 comments on commit acba306

Please sign in to comment.