Sha256: 208f5678e0ec29757204748e91437f65871bc9ea927d62e1071742cecbe7020c
Contents?: true
Size: 746 Bytes
Versions: 8
Compression:
Stored size: 746 Bytes
Contents
import esbuild from "esbuild"; import path from "path"; import fs from "fs"; import config from "../../config/esbuild.config.mjs"; const metafilePath = "tmp/bundle-metadata.json"; function ensureDirectoryExistence(filePath) { var dirname = path.dirname(filePath); if (fs.existsSync(dirname)) { return true; } ensureDirectoryExistence(dirname); fs.mkdirSync(dirname); } ensureDirectoryExistence(metafilePath); esbuild.build({ ...config, metafile: true }).then((result) => { fs.writeFileSync(metafilePath, JSON.stringify(result.metafile)); console.log("\nā Bundle metadata file generated."); console.log( `š You can now upload '${metafilePath}' to https://esbuild.github.io/analyze/ for bundle analysis.` ); });
Version data entries
8 entries across 8 versions & 1 rubygems