1.0.6 • Published 5 years ago

webpack-build-log-plugin v1.0.6

Weekly downloads
4
License
ISC
Repository
github
Last release
5 years ago
  cnpm install webpack-build-log-plugin -D
  npm i webpack-build-log-plugin -D
  yarn add --dev webpack-build-log-plugin

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

The webpack-build-log-plugin works without configuration.

The plugin will friendly display compilation details

webpack.config.prod.js

const WebpackBuildLogPlugin = require("webpack-build-log-plugin");

module.exports = {
    plugins: [
        new WebpackBuildLogPlugin(options)
    ]
}

You can pass a hash of configuration options to webpack-build-log-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
deleteFile{boolean}falseWhether to delete compilation output

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 webpackBuildLogPlugin({
      path: path.join(process.cwd(),'log'),
      filename: 'compile-log.md',
      // Note: Compile logs will only be output in the production environment.
      //And you need to set process.env.NODE_ENV in different environments.
      deleteFile: process.env.NODE_ENV=="production"
    })
  ]
}
1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago