@@ -43,7 +43,10 @@ const remarkPlugins = [
4343 UnversionedDocsLinksRemark ,
4444] ;
4545
46+ // See https://docs.netlify.com/configure-builds/environment-variables/
4647const isDeployPreview = ! ! process . env . NETLIFY && process . env . CONTEXT === 'deploy-preview' ;
48+ const isNetlifyProductionDeployment = process . env . NETLIFY && process . env . CONTEXT === 'production' ;
49+ const isProductionDeployment = isNetlifyProductionDeployment ;
4750
4851const getBaseUrl = ( ) => {
4952 if ( typeof process . env . BASEURL !== 'undefined' ) {
@@ -60,6 +63,7 @@ const config = {
6063 tagline : 'Nurturing Moodle Developers' ,
6164 future : {
6265 experimental_faster : true ,
66+ v4 : true ,
6367 } ,
6468
6569 // url: 'https://develop.moodle.org',
@@ -139,6 +143,19 @@ const config = {
139143 } ) ,
140144 /** @type {import('@docusaurus/preset-classic').ThemeConfig } */
141145 plugins : [
146+ function disableExpensiveBundlerOptimizationPlugin ( ) {
147+ // As documented in https://github.com/facebook/docusaurus/discussions/11199.
148+ return {
149+ name : 'disable-expensive-bundler-optimizations' ,
150+ configureWebpack ( _config , isServer ) {
151+ return {
152+ optimization : {
153+ concatenateModules : isProductionDeployment ? ! isServer : false ,
154+ } ,
155+ } ;
156+ } ,
157+ } ;
158+ } ,
142159 [
143160 '@docusaurus/plugin-content-docs' ,
144161 {
0 commit comments