0.0.3 • Published 7 years ago

evaluate-bundle-webpack-plugin v0.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

evaluate-bundle-webpack-plugin

Evaluates the freshly built bundle and executes a callback right before chunks are emitted. The callback is expected to return an object of additional chunks keyed by the relative chunk name.

Usage

Add evaluate-bundle-webpack-plugin to the plugins section of your webpack config.

const EvaluateBundlePlugin = require('evaluate-bundle-webpack-plugin');

module.exports = {
  // ...
  plugins: [
    new EvaluateBundlePlugin({
      callback: function(bundle, stats) {
        return {
          'robots.txt': 'User-agent: *\nDisallow:\n',
        };
      }
    }),
  ],
  // ...
};

Configuration

OptionDescription
callbackFunction that receives two parameters: the exports of the entrypoint of the evaluated bundle and the stats object from the compilation

:warning: This is in super alpha :warning:

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago