Metadata Report for esbuild
npm i esbuild-metadata-report
- As esbuild plugin
const metadataReport = require('esbuild-metadata-report');
await esbuild.build({
// required metafile is true
metafile: true,
plugins: [
metadataReport({
name: 'Metadata Report',
outputFile: './metadata-reports/index.html'
})
]
});
- As a function
const metadataReport = require('esbuild-metadata-report');
const res = await esbuild.build({
// required metafile is true
metafile: true
});
const htmlPath = metadataReport({
metadata: res.metafile,
name: 'Metadata Report',
outputFile: './metadata-reports/index.html'
});