mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-05 12:22:45 +02:00
fix(bundler): fix docusaurus start
using concatenateModules: true
(#11222)
This commit is contained in:
parent
1c454a9430
commit
ffa7525ff9
2 changed files with 10 additions and 7 deletions
|
@ -253,13 +253,6 @@ export async function createBaseConfig({
|
||||||
modules: ['node_modules', path.join(siteDir, 'node_modules')],
|
modules: ['node_modules', path.join(siteDir, 'node_modules')],
|
||||||
},
|
},
|
||||||
optimization: {
|
optimization: {
|
||||||
// The optimization.concatenateModules is expensive
|
|
||||||
// - On the server, it's not useful to run it at all
|
|
||||||
// - On the client, it leads to a ~3% JS assets total size decrease
|
|
||||||
// Let's keep it by default, but large sites may prefer faster builds
|
|
||||||
// See also https://github.com/facebook/docusaurus/pull/11176
|
|
||||||
concatenateModules: !isServer,
|
|
||||||
|
|
||||||
// The optimization.mergeDuplicateChunks is expensive
|
// The optimization.mergeDuplicateChunks is expensive
|
||||||
// - On the server, it's not useful to run it at all
|
// - On the server, it's not useful to run it at all
|
||||||
// - On the client, we compared assets/js before/after and see 0 change
|
// - On the client, we compared assets/js before/after and see 0 change
|
||||||
|
|
|
@ -52,6 +52,16 @@ export default async function createServerConfig({
|
||||||
color: 'yellow',
|
color: 'yellow',
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
optimization: {
|
||||||
|
// The optimization.concatenateModules is expensive
|
||||||
|
// - On the server, it's not useful to run it at all
|
||||||
|
// - On the client, it leads to a ~3% JS assets total size decrease
|
||||||
|
// Let's keep it by default, but large sites may prefer faster builds
|
||||||
|
// See also https://github.com/facebook/docusaurus/pull/11176
|
||||||
|
// Note: we don't want to enable it on the client for "docusaurus start"
|
||||||
|
// See also https://github.com/facebook/docusaurus/pull/11222
|
||||||
|
concatenateModules: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
return {config, serverBundlePath};
|
return {config, serverBundlePath};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue