MCPcopy
hub / github.com/vercel/next.js / getResourceSize

Function getResourceSize

test/production/bundle-size/bundle-size.test.ts:129–133  ·  view source on GitHub ↗
(resources: Promise<string>[])

Source from the content-addressed store, hash-verified

127})
128
129function getResourceSize(resources: Promise<string>[]) {
130 return Promise.all(resources).then((resources) =>
131 resources.reduce((acc, r) => acc + getGzipSize.sync(Buffer.from(r)), 0)
132 )
133}

Callers 1

Calls 4

thenMethod · 0.80
allMethod · 0.80
reduceMethod · 0.80
fromMethod · 0.45

Tested by

no test coverage detected