Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
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
The npm package webpack-build-report receives a total of 0 weekly downloads. As such, webpack-build-report popularity was classified as not popular.
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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.