New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

webpack-build-report

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-build-report

Build a report file after a Webpack build

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
Maintainers
1
Weekly downloads
 
Created
Source

webpack-build-report

npm npm

Webpack plugin that make it able to save your build reports in an .md file after each build.

Installation

NPM
$ npm i webpack-build-report --save-dev
Yarn (even better)
$ yarn add webpack-build-report --dev

Example

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

Configuration options

OptionTypeDefault valueDescription
appendboolfalseAppends the report to an existing .md file, based on the output option
assetsbooltrueAdds the assets stats to the final report
outputstring'build-report.md'Tell the plugin where you want your report to be saved. Must be an .md file !
saveStatsboolfalseSaves 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:

Build report

  • Hash: 3776828640c3fab88ac5
  • Version: webpack 1.14.0
  • Time: 2813ms
  • Generated on : December 17, 2016 4:48 PM

Assets list

Asset nameAsset sizeSize difference
AlertIllustration.js17.41 kB+6.45 kB
Button.js8.41 kB-
Checkbox.js7.26 kB-
Loader.js6.07 kB-21.12 kB
Modal.js15.93 kB-
PhoneLoader.js16.66 kB-4.00 kB

Keywords

FAQs

Package last updated on 21 Dec 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc