Created
September 22, 2017 11:06
-
-
Save ShaileshPrajapati-BTC/9dee901aeb698e527a6af361599d824e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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