🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

evaluate-bundle-webpack-plugin

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

evaluate-bundle-webpack-plugin

Webpack plugin that evaluates the built bundle and provides an emit callback

0.0.3
latest
Version published
Weekly downloads
5
66.67%
Maintainers
1
Weekly downloads
 
Created

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:

FAQs

Package last updated on 15 Aug 2017

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