Skip to content

Commit

Permalink
Enable long term caching (don't change hash when no files changed)
Browse files Browse the repository at this point in the history
  • Loading branch information
thangngoc89 committed Apr 1, 2016
1 parent 680c4d5 commit d76c0b8
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion scripts/webpack.config.client.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import path from "path"

import webpack from "webpack"
// ! client side loader only \\
export default ({ config }) => {
const { webpackConfig } = config
Expand Down Expand Up @@ -31,6 +31,29 @@ export default ({ config }) => {

entry: {
"statinamic-client": path.join(__dirname, "index-client"),
"statinamic-bundle": [
"react",
"react-dom",
"redux",
"react-redux",
"react-helmet",
"whatwg-fetch",
],
},

...config.production && {
output: {
...webpackConfig.output,
filename: "[name].[chunkhash].js",
chunkFilename: "[chunkhash].js",
},

plugins: [
...webpackConfig.plugins,
new webpack.optimize.CommonsChunkPlugin({
names: [ "statinamic-bundle", "manifest" ],
}),
],
},
}
}

0 comments on commit d76c0b8

Please sign in to comment.