Skip to content

Commit

Permalink
feat: make bundle size clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
tjx666 committed Apr 3, 2024
1 parent 0336759 commit 8aac267
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/pkg-hover-contents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ class PkgHoverContentsCreator {

let result = '';
if (!packageInfo.isBuiltinModule && packageInfo.webpackBundleSize) {
result = `BundleSize:${spacing(3)}${formatSize(
result = `[BundleSize](https://bundlephobia.com/package/${getPkgNameAndVersion(packageInfo)}):${spacing(1)}${formatSize(
packageInfo.webpackBundleSize.normal,
)}${spacing(3)}(gzip:${spacing(1)}${formatSize(packageInfo.webpackBundleSize.gzip)})`;
)}${spacing(1)}(gzip:${spacing(1)}${formatSize(packageInfo.webpackBundleSize.gzip)})`;
}
return result;
}
Expand Down

0 comments on commit 8aac267

Please sign in to comment.