Skip to content

Commit

Permalink
Add cache buster to bundle.js
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleAMathews committed May 8, 2016
1 parent 218f884 commit c1eee90
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion html.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import DocumentTitle from 'react-document-title'
import { prefixLink } from 'gatsby-helpers'
import { TypographyStyle } from 'utils/typography'

const BUILD_TIME = new Date().getTime()

module.exports = React.createClass({
propTypes () {
Expand Down Expand Up @@ -35,7 +36,7 @@ module.exports = React.createClass({
</head>
<body>
<div id="react-mount" dangerouslySetInnerHTML={{ __html: this.props.body }} />
<script src={prefixLink('/bundle.js')} />
<script src={prefixLink(`/bundle.js?t=${BUILD_TIME}`)} />
</body>
</html>
)
Expand Down

0 comments on commit c1eee90

Please sign in to comment.