Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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') {