Webpack Usage

If you are using webpack to build your app, we suggest you are using our plugin for it. It’s main advantage is can knows which files your build is creating, and thus need to be submited. The plugin will:

  • Automatically find your build’s output files and submit their sizes.
  • All the other things the command line also does, including identifying commit and branch info from the local code repository or CI environment.


First, install the plugin:

$ npm install --save-dev bundlecop

# or with yarn:
$ yarn add --dev bundlecop

Then, add it to your webpack configuration:

const {BundleCopWebpackPlugin} = require('bundlecop');

var webpackConfig = {
  entry: '...',
  output: {...},
  plugins: [
    new BundleCopWebpackPlugin({
      projectKey: 'YOUR_PROJECT_KEY',
      bundleSet: 'YOUR_BUNDLE_SET_ID'

Copy your keys from the project dashboard into the configuration.