Skip to content

Commit

Permalink
fix: source should ignore asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
nonzzz committed Apr 8, 2024
1 parent bdd9b8d commit d16ce66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/server/analyzer-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export class AnalyzerNode {
})

for (const id in chunks) {
if (!KNOWN_EXT_NAME.includes(path.extname(id))) continue
const code = chunks[id]
const b = stringToByte(code)
const { byteLength: gzipSize } = await compress(b)
Expand Down
2 changes: 1 addition & 1 deletion src/server/trie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class FileSystemTrie<T> {
case 'stat':
child.statSize = child.groups.reduce((acc, cur) => acc + cur.statSize, 0)
break
case 'source':{
case 'source': {
const size = child.groups.reduce((acc, cur) => {
acc.parsedSize += cur.parsedSize
acc.gzipSize += cur.gzipSize
Expand Down

0 comments on commit d16ce66

Please sign in to comment.