Find the cost of adding an npm package to your app's bundle size teardown.kelinci.dev
14
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: unnecessary exports

Mary 68dbae36 9571ada4

+5 -7
+5 -7
src/npm/lib/bundler.ts
··· 8 8 import { BundleError } from './errors'; 9 9 import { analyzeModule } from './module-type'; 10 10 11 - export type { BundleChunk, BundleOptions, BundleResult }; 12 - 13 11 const { volume } = memfs!; 14 12 15 13 // #region helpers ··· 40 38 /** 41 39 * get gzip size using compression stream. 42 40 */ 43 - async function getGzipSize(code: string): Promise<number> { 41 + function getGzipSize(code: string): Promise<number> { 44 42 return getCompressedSize(code, 'gzip'); 45 43 } 46 44 ··· 50 48 * - `true`: supported 51 49 * - `false`: not supported 52 50 */ 53 - export let isBrotliSupported: boolean | undefined; 51 + let isBrotliSupported: boolean | undefined; 54 52 55 53 /** 56 54 * get brotli size using compression stream, if supported. 57 55 * returns `undefined` if brotli is not supported by the browser. 58 56 */ 59 - export async function getBrotliSize(code: string): Promise<number | undefined> { 57 + async function getBrotliSize(code: string): Promise<number | undefined> { 60 58 if (isBrotliSupported === false) { 61 59 return undefined; 62 60 } ··· 85 83 * - `true`: supported 86 84 * - `false`: not supported 87 85 */ 88 - export let isZstdSupported: boolean | undefined; 86 + let isZstdSupported: boolean | undefined; 89 87 90 88 /** 91 89 * get zstd size using compression stream, if supported. 92 90 * returns `undefined` if zstd is not supported by the browser. 93 91 */ 94 - export async function getZstdSize(code: string): Promise<number | undefined> { 92 + async function getZstdSize(code: string): Promise<number | undefined> { 95 93 if (isZstdSupported === false) { 96 94 return undefined; 97 95 }