Skip to content

Commit

Permalink
use contenthash:8 since that's more recommended
Browse files Browse the repository at this point in the history
  • Loading branch information
endiliey committed Oct 27, 2019
1 parent 35cf4f0 commit 5ea3536
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG-2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Unreleased

- Convert sitemap plugin to TypeScript
- Significantly reduce main bundle size and initial HTML payload on production build.
- Significantly reduce main bundle size and initial HTML payload on production build. Generated JS files from webpack is also shorter in name.

## 2.0.0-alpha.31

Expand Down
8 changes: 4 additions & 4 deletions packages/docusaurus/src/webpack/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export function createBaseConfig(
output: {
pathinfo: false,
path: outDir,
filename: isProd ? '[name].[contenthash].js' : '[name].js',
chunkFilename: isProd ? '[name].[contenthash].js' : '[name].js',
filename: isProd ? '[name].[contenthash:8].js' : '[name].js',
chunkFilename: isProd ? '[name].[contenthash:8].js' : '[name].js',
publicPath: baseUrl,
},
// Don't throw warning when asset created is over 250kb
Expand Down Expand Up @@ -157,8 +157,8 @@ export function createBaseConfig(
},
plugins: [
new MiniCssExtractPlugin({
filename: isProd ? '[name].[contenthash].css' : '[name].css',
chunkFilename: isProd ? '[name].[contenthash].css' : '[name].css',
filename: isProd ? '[name].[contenthash:8].css' : '[name].css',
chunkFilename: isProd ? '[name].[contenthash:8].css' : '[name].css',
}),
],
};
Expand Down

0 comments on commit 5ea3536

Please sign in to comment.