Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
webpack-build-report
Advanced tools
Webpack plugin that make it able to save your build reports in an .md
file after each build.
$ npm i webpack-build-report --save-dev
$ yarn add webpack-build-report --dev
webpack.config.js
// Import the plugin
const BuildReportPlugin = require('webpack-build-report')
// Let's say you build a library of React components. you build them one by one
const components = fs.readdirSync(`${SRC_DIR}/components/`)
const entries = {}
components.forEach(component => {
const name = component.split('.')[0]
entries[name] = `${SRC_DIR}/components/${name}`
})
// Add the plugin to your webpack config
const config = {
entry: entries,
plugins: [
// other plugins ...,
new BuildReportPlugin({
assets: true,
output: `${SRC_DIR}/doc/build-report.md`,
...
})
]
}
// ...
module.exports = config
Option | Type | Default value | Description |
---|---|---|---|
append | bool | false | Appends the report to an existing .md file, based on the output option |
assets | bool | true | Adds the assets stats to the final report |
output | string | 'build-report.md' | Tell the plugin where you want your report to be saved. Must be an .md file ! |
saveStats | bool | false | Saves the complete build stats in .build-stats.json , and allow your report to show comparisons to the last build |
After your build has finished, you'll find a build-report.md
file, containing:
Asset name | Asset size | Size difference |
---|---|---|
AlertIllustration.js | 17.41 kB | +6.45 kB |
Button.js | 8.41 kB | - |
Checkbox.js | 7.26 kB | - |
Loader.js | 6.07 kB | -21.12 kB |
Modal.js | 15.93 kB | - |
PhoneLoader.js | 16.66 kB | -4.00 kB |
FAQs
Build a report file after a Webpack build
We found that webpack-build-report demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.