mirror of
https://github.com/facebook/docusaurus.git
synced 2025-12-26 01:33:02 +00:00
fix(bundler): fix `docusaurus start` using `concatenateModules: true` (#11222)
Some checks failed
Argos CI / take-screenshots (push) Has been cancelled
Build Hash Router / Build Hash Router (push) Has been cancelled
Canary Release / Publish Canary (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Continuous Releases / Continuous Releases (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (18.0) (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (20) (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (22) (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (24) (push) Has been cancelled
E2E Tests / E2E — Yarn Berry (node-modules, -s) (push) Has been cancelled
E2E Tests / E2E — Yarn Berry (node-modules, -st) (push) Has been cancelled
E2E Tests / E2E — Yarn Berry (pnp, -s) (push) Has been cancelled
E2E Tests / E2E — Yarn Berry (pnp, -st) (push) Has been cancelled
E2E Tests / E2E — npm (push) Has been cancelled
E2E Tests / E2E — pnpm (push) Has been cancelled
Some checks failed
Argos CI / take-screenshots (push) Has been cancelled
Build Hash Router / Build Hash Router (push) Has been cancelled
Canary Release / Publish Canary (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Continuous Releases / Continuous Releases (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (18.0) (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (20) (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (22) (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (24) (push) Has been cancelled
E2E Tests / E2E — Yarn Berry (node-modules, -s) (push) Has been cancelled
E2E Tests / E2E — Yarn Berry (node-modules, -st) (push) Has been cancelled
E2E Tests / E2E — Yarn Berry (pnp, -s) (push) Has been cancelled
E2E Tests / E2E — Yarn Berry (pnp, -st) (push) Has been cancelled
E2E Tests / E2E — npm (push) Has been cancelled
E2E Tests / E2E — pnpm (push) Has been cancelled
This commit is contained in:
parent
1c454a9430
commit
ffa7525ff9
|
|
@ -253,13 +253,6 @@ export async function createBaseConfig({
|
|||
modules: ['node_modules', path.join(siteDir, 'node_modules')],
|
||||
},
|
||||
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
|
||||
// - 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
|
||||
|
|
|
|||
|
|
@ -52,6 +52,16 @@ export default async function createServerConfig({
|
|||
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};
|
||||
|
|
|
|||
Loading…
Reference in New Issue