Skip to content

Instantly share code, notes, and snippets.

@prateekbh
Last active November 4, 2016 11:55
Show Gist options
  • Save prateekbh/9ae5014310dfd42c9f9381652740fda5 to your computer and use it in GitHub Desktop.
Save prateekbh/9ae5014310dfd42c9f9381652740fda5 to your computer and use it in GitHub Desktop.
var webpack = require('webpack');
var path = require("path");
var CommonsPlugin = new require("webpack/lib/optimize/CommonsChunkPlugin");
var VendorChunkPlugin = require('webpack-vendor-chunk-plugin');
module.exports = {
entry: {
home: './home.js',
browse: './browse.js',
product: './product.js',
app:'./app.js',
vendor: './vendor.js'
},
output: {
filename: "./public/[name].bundle.js",
chunkFilename: "./public/[name].bundle.js"
},
plugins: [
new CommonsPlugin({
minChunks: Infinity,
name: "vendor"
}),
new webpack.ProvidePlugin({
riot: "riot"
})
],
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel',
query: { presets: ['es2015'] }
},{
test: /\.tag$/,
loader: 'tag'
}]
},
devServer: {
contentBase: '/public'
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment