An utility for calculating file or directory size.
Install it by running the following command:
npm install @kumardeo/file-size
npx @kumardeo/file-size build --gzip --include ".(js|ts)$"
import { fileSizeSync } from "@kumardeo/file-size";
const result = fileSizeSync(new URL("./build", import.meta.url), {
include: [/\.(js|ts)$/]
});
console.log(result);