Skip to content

Commit 8223eba

Browse files
authored
fix: build message formatting (#948)
* fix: Build output message formatting w/ dynamic import module * docs: Adding changeset
1 parent 1d0e305 commit 8223eba

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.changeset/smart-plants-appear.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'microbundle': patch
3+
---
4+
5+
Corrects formatting in build completion message w/ dynamic import is used

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export default async function microbundle(inputOptions) {
144144
? blue(`Build "${options.pkg.name}" to ${targetDir}:`)
145145
: red(`Error: No entry module found for "${options.pkg.name}"`);
146146
return {
147-
output: `${banner}\n ${out.join('\n ')}`,
147+
output: `${banner}\n${out.join('\n')}`,
148148
};
149149
}
150150

src/lib/compressed-size.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function getPadLeft(str, width, char = ' ') {
1111
function formatSize(size, filename, type, raw) {
1212
const pretty = raw ? `${size} B` : prettyBytes(size);
1313
const color = size < 5000 ? green : size > 40000 ? red : yellow;
14-
const indent = getPadLeft(pretty, type === 'br' ? 13 : 10);
14+
const indent = getPadLeft(pretty, 13);
1515
return `${indent}${color(pretty)}: ${white(basename(filename))}.${type}`;
1616
}
1717

0 commit comments

Comments
 (0)