How to use the webpack-bundle-tracker function in webpack-bundle-tracker

To help you get started, we’ve selected a few webpack-bundle-tracker examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ncrmro / rjango / webpack.config.babel.js View on Github external
import webpack from 'webpack'
import BundleTracker from 'webpack-bundle-tracker'
import ExtractTextPlugin from 'extract-text-webpack-plugin'
import dotenv from 'dotenv'

dotenv.load()

let
  env = process.env,
  devServerPort = env.WEBPACK_PORT ? env.WEBPACK_PORT : 3000,
  appEntry,
  devtool,
  plugins,
  publicPath,
  buildPath = path.join(__dirname, 'static', 'bundles'),
  statsPlugin = new BundleTracker(
    {
      path: __dirname,
      filename: 'static/webpack-stats.json',
      indent: true
    }),
  cssExtractTextPlugin = new ExtractTextPlugin({
      filename: '[name]-[hash].css',
      allChunks: true
    }
  ),
  vendorPlugin = new webpack.optimize.CommonsChunkPlugin({
    name: 'vendor',
    filename: 'vendor.js'
  })

if (process.env.NODE_ENV === 'production') {

webpack-bundle-tracker

Spits out some stats about webpack compilation process to a file

MIT
Latest version published 4 months ago

Package Health Score

71 / 100
Full package analysis