Skip to content

Commit f717d21

Browse files
committed
docs(website): Include hash in filename for correct cache invalidation
1 parent a7d8a75 commit f717d21

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

examples/src/index.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<meta property="og:url" content="https://reactcommunity.org/react-tabs">
1212
<meta property="og:site_name" content="React-Tabs">
1313
<meta property="og:type" content="article">
14-
<link rel="stylesheet" href="example.css">
1514
<link rel="icon" type="image/x-icon" href="favicon.ico">
1615
</head>
1716
<body>
@@ -35,6 +34,5 @@ <h2 class="page-header__subtitle">An accessible and easy tab component for <a hr
3534
<span>Copyright &copy; <a href="https://twitter.com/TschinderDaniel" target="_blank">Daniel Tschinder</a> 2017. MIT Licensed.</span>
3635
</div>
3736
</footer>
38-
<script src="app.js"></script>
3937
<script src="https://app.codesponsor.io/scripts/Ju8oE2DZP43taMfclWLb8w?theme=light&height=100&width=600&image=hide"></script>
4038
</body>

webpack.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const isDev = process.env.NODE_ENV !== 'production';
1212
const plugins = [
1313
new HtmlWebpackPlugin({
1414
filename: 'index.html',
15-
inject: false,
15+
inject: true,
1616
template: path.resolve(__dirname, 'examples/src/index.html'),
1717
minify: {
1818
collapseWhitespace: !isDev,
@@ -21,7 +21,7 @@ const plugins = [
2121
removeRedundantAttributes: !isDev,
2222
},
2323
}),
24-
new ExtractTextPlugin('example.css'),
24+
new ExtractTextPlugin('app-[hash].css'),
2525
new webpack.optimize.ModuleConcatenationPlugin(),
2626
];
2727

@@ -48,7 +48,7 @@ module.exports = {
4848
},
4949
output: {
5050
path: targetDirectory,
51-
filename: '[name].js',
51+
filename: '[name]-[hash].js',
5252
publicPath: '/',
5353
},
5454
devServer: {

0 commit comments

Comments
 (0)