Skip to content

Instantly share code, notes, and snippets.

@ShaileshPrajapati-BTC
Created September 22, 2017 11:06
Show Gist options
  • Save ShaileshPrajapati-BTC/9dee901aeb698e527a6af361599d824e to your computer and use it in GitHub Desktop.
Save ShaileshPrajapati-BTC/9dee901aeb698e527a6af361599d824e to your computer and use it in GitHub Desktop.
var path = require("path")
var webpack = require('webpack')
var BundleTracker = require('webpack-bundle-tracker')
module.exports = {
context: __dirname,
entry: './assets/js/index.js',
output: {
path: path.resolve('./assets/bundles/'),
filename: "[name]-[hash].js",
},
plugins: [
new BundleTracker({filename: './webpack-stats.json'}),
],
module: {
loaders: [
{ test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ },
{ test: /\.jsx$/, loader: 'babel-loader', exclude: /node_modules/ }
],
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment