Skip to content

Commit

Permalink
[BUGFIX] - chunkhash, updated staticBundleUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelBenin committed Jan 9, 2018
1 parent dc9bbfa commit 02ca3f1
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 2 deletions.
2 changes: 2 additions & 0 deletions gulpfile.babel.js/configs/webpack.config.production.js
Expand Up @@ -3,6 +3,7 @@ const path = require('path');
const webpack = require('webpack');
const ShakePlugin = require('webpack-common-shake').Plugin;
const ManifestPlugin = require('webpack-manifest-plugin');
const WebpackChunkHash = require('webpack-chunk-hash');

module.exports = {
devtool: 'source-map',
Expand Down Expand Up @@ -60,6 +61,7 @@ module.exports = {
},
filename: 'vendor.[hash].js'
}),
new WebpackChunkHash({ algorithm: 'md5' }),
new ShakePlugin(),
new webpack.optimize.ModuleConcatenationPlugin(),
new webpack.LoaderOptionsPlugin({
Expand Down
45 changes: 44 additions & 1 deletion npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Expand Up @@ -180,6 +180,7 @@
"wdio-selenium-standalone-service": "0.0.9",
"webdriverio": "4.9.11",
"webpack": "3.10.0",
"webpack-chunk-hash": "0.5.0",
"webpack-common-shake": "1.5.3",
"webpack-dev-server": "2.9.7",
"webpack-manifest-plugin": "1.3.2"
Expand Down
2 changes: 1 addition & 1 deletion src/views/containers/layouts/layout.js
Expand Up @@ -110,7 +110,7 @@ class Layout extends Component {
return this.props.chunks.map(chunk => (
<script
key={chunk}
src={`${this.props.staticVendorUrl}/${this.props.manifestJSON[chunk]}`}
src={`${this.props.staticBundleUrl}/${this.props.manifestJSON[chunk]}`}
defer
/>
));
Expand Down

0 comments on commit 02ca3f1

Please sign in to comment.