Socket
Socket
Sign inDemoInstall

additional-compile-webpack-plugin

Package Overview
Dependencies
277
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    additional-compile-webpack-plugin

Kick off another webpack compilation after the main one has finished


Version published
Maintainers
1
Created

Readme

Source

post-compile-webpack-plugin

Yo dawg! I put a compiler in your compiler, so you can compile while after you compile!

This plugin enables you to start another compile step with access to the output of the main compilation.

For example, if your current webpack setup generates dist/lib.js, with this plugin you can configure a child compilation step that executes after dist/lib.js has been built, so you can require() it.

Usage

The plugin expects a webpack configuration object during initialization. Currently only entry, output and plugins are supported. In addition to that, the child compilation inherits the configuration of the main compilation.

Example:

const PostCompilePlugin = require( 'post-compile-webpack-plugin' );
const path = require( 'path' );

module.exports = {
  entry: {
    lib: './index.js'
  },
  output: {
    path: path.resolve(__dirname, 'dist'),
    filename: '[name].js'
  },
  plugins: [
    new PostCompilePlugin({
      entry: {
        example1: './examples/example1.js',
        example2: './examples/example2.js'
      }
    })
  ]
};

FAQs

Last updated on 30 May 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc