summaryrefslogtreecommitdiff
path: root/webpack.config.js
diff options
context:
space:
mode:
authorYukai Huang2016-10-11 12:30:30 +0800
committerYukai Huang2016-10-11 12:30:30 +0800
commit9c8752d4521c7cffccf4313eca5cd6ff4f88c305 (patch)
tree512b79364935446b3f41f13aa80255a35b8e2f08 /webpack.config.js
parent7086a8c5e7affba9094217c4aa2ed58dbcce1341 (diff)
Split common vendor javascript into chunks
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/webpack.config.js b/webpack.config.js
index 5a7d6718..de2bb8b6 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -17,14 +17,26 @@ module.exports = {
new webpack.DefinePlugin({
"require.specified": "require.resolve"
}),
- new ExtractTextPlugin("[name].css")
+ new ExtractTextPlugin("[name].css"),
+ new webpack.optimize.CommonsChunkPlugin({
+ name: "vendor",
+ filename: "vendor.bundle.js",
+ minChunks: Infinity,
+ })
],
entry: {
index: path.join(__dirname, 'public/js/index.js'),
public: path.join(__dirname, 'public/js/public.js'),
slide: path.join(__dirname, 'public/js/slide.js'),
- locale: path.join(__dirname, 'public/js/locale.js')
+ locale: path.join(__dirname, 'public/js/locale.js'),
+ vendor: [
+ "expose?$!expose?jQuery!jquery",
+ "jquery-textcomplete",
+ "jquery-mousewheel",
+ "jquery-scrollspy/jquery-scrollspy",
+ "bootstrap"
+ ]
},
output: {