Last active
November 4, 2016 11:55
-
-
Save prateekbh/9ae5014310dfd42c9f9381652740fda5 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 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