1.1.3 • Published 3 years ago

empty-webpack-build-detail-plugin v1.1.3

Weekly downloads
2
License
ISC
Repository
github
Last release
3 years ago
  cnpm install empty-webpack-build-detail-plugin -D
  npm i empty-webpack-build-detail-plugin -D
  yarn add --dev empty-webpack-build-detail-plugin

This is a webpack plugin tailored for emptyd-desgin and can be used in your project. No difference

The empty-webpack-build-detail-plugin works without configuration.

The plugin will friendly display compilation details

webpack.config.prod.js

const emptyWebpackBuildDetailPlugin = require("empty-webpack-build-detail-plugin");

module.exports = {
    -entry: 'index.js',
    -output: {
        -path: __dirname + '/dist',
        -filename: 'index_bundle.js'
    -},
    plugins: [
        new emptyWebpackBuildDetailPlugin(options)
    ]
}

You can pass a hash of configuration options to empty-webpack-build-detail-plugin. Allowed values are as follows

NameTypeDefaultDescription
path{String}compilation.options.contextThe path to use for the compile log
filename{String}'compilation-detail.md'The file to write the compile log to. Defaults to compilation-detail.md
warnAfterBundleGzipSize{number}512*1024 (Bit)Maximum limit for bundle files
warnAfterChunkGzipSize{number}1024*1024 (Bit)Maximum limit for chunk files

Here's an example webpack config illustrating how to use these options

webpack.config.js

{
  entry: 'index.js',
  output: {
    path: __dirname + '/dist',
    filename: 'index_bundle.js'
  },
  plugins: [
    new emptyWebpackBuildDetailPlugin({
      path: path.join(process.cwd(),'log'),
      filename: 'compile-log.md'
    })
  ]
}