Skip to content

Commit 7e1e342

Browse files
committed
[repo] Bump to Docusaurus 3.8
1 parent d8660fa commit 7e1e342

File tree

3 files changed

+5947
-8797
lines changed

3 files changed

+5947
-8797
lines changed

docusaurus.config.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ const remarkPlugins = [
4343
UnversionedDocsLinksRemark,
4444
];
4545

46+
// See https://docs.netlify.com/configure-builds/environment-variables/
4647
const isDeployPreview = !!process.env.NETLIFY && process.env.CONTEXT === 'deploy-preview';
48+
const isNetlifyProductionDeployment = process.env.NETLIFY && process.env.CONTEXT === 'production';
49+
const isProductionDeployment = isNetlifyProductionDeployment;
4750

4851
const getBaseUrl = () => {
4952
if (typeof process.env.BASEURL !== 'undefined') {
@@ -60,6 +63,10 @@ const config = {
6063
tagline: 'Nurturing Moodle Developers',
6164
future: {
6265
experimental_faster: true,
66+
v4: {
67+
removeLegacyPostBuildHeadAttribute: true,
68+
useCssCascadeLayers: true,
69+
},
6370
},
6471

6572
// url: 'https://develop.moodle.org',
@@ -139,6 +146,19 @@ const config = {
139146
}),
140147
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
141148
plugins: [
149+
function disableExpensiveBundlerOptimizationPlugin() {
150+
// As documented in https://github.com/facebook/docusaurus/discussions/11199.
151+
return {
152+
name: 'disable-expensive-bundler-optimizations',
153+
configureWebpack(_config, isServer) {
154+
return {
155+
optimization: {
156+
concatenateModules: isProductionDeployment ? !isServer : false,
157+
},
158+
};
159+
},
160+
};
161+
},
142162
[
143163
'@docusaurus/plugin-content-docs',
144164
{

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
"spell": "cspell '*.md' '*.mdx' '**/*.md' '**/*.mdx' 'docs/*.md' 'docs/*.mdx' 'docs/**/*.md' 'docs/**/*.mdx' 'general/*.md' 'general/*.mdx' 'general/**/*.md' 'general/**/*.mdx'"
3333
},
3434
"dependencies": {
35-
"@docusaurus/core": "^3.7.0",
36-
"@docusaurus/faster": "^3.7.0",
37-
"@docusaurus/plugin-pwa": "^3.7.0",
38-
"@docusaurus/preset-classic": "^3.7.0",
39-
"@docusaurus/theme-mermaid": "^3.7.0",
35+
"@docusaurus/core": "^3.8.0",
36+
"@docusaurus/faster": "^3.8.0",
37+
"@docusaurus/plugin-pwa": "^3.8.0",
38+
"@docusaurus/preset-classic": "^3.8.0",
39+
"@docusaurus/theme-mermaid": "^3.8.0",
4040
"@emotion/react": "^11.10.5",
4141
"@emotion/styled": "^11.10.5",
4242
"@mdx-js/react": "^3.0.0",

0 commit comments

Comments
 (0)