mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-27 06:57:57 +02:00
feat(v2): separate runtimechunk (#1355)
* feat(v2): separate runtimechunk * nits
This commit is contained in:
parent
415d2b33d1
commit
f95ac033fd
2 changed files with 5 additions and 2 deletions
|
@ -86,8 +86,6 @@ module.exports = async function start(siteDir, cliOptions = {}) {
|
|||
plugins: [
|
||||
// Generates an `index.html` file with the <script> injected.
|
||||
new HtmlWebpackPlugin({
|
||||
inject: false,
|
||||
hash: true,
|
||||
template: path.resolve(
|
||||
__dirname,
|
||||
'../client/templates/index.html.template.ejs',
|
||||
|
|
|
@ -20,6 +20,11 @@ module.exports = function createClientConfig(props) {
|
|||
entry: {
|
||||
main: path.resolve(__dirname, '../client/clientEntry.js'),
|
||||
},
|
||||
optimization: {
|
||||
// Keep the runtime chunk separated to enable long term caching
|
||||
// https://twitter.com/wSokra/status/969679223278505985
|
||||
runtimeChunk: true,
|
||||
},
|
||||
plugins: [
|
||||
// Generate manifests file
|
||||
new ReactLoadableSSRAddon({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue