@@ -48,6 +48,7 @@ const ORGANIZATION_NAME = siteConfig.gitHub?.orgName ?? 'gbsl-informatik';
4848const PROJECT_NAME = siteConfig . gitHub ?. projectName ?? 'teaching-dev' ;
4949const GH_OAUTH_CLIENT_ID = process . env . GH_OAUTH_CLIENT_ID ;
5050const DEFAULT_TEST_USER = process . env . DEFAULT_TEST_USER ?. trim ( ) ;
51+ const RUNS_IN_STACKBLITZ = ! ! process . env . STACKBLITZ ;
5152
5253
5354const config : Config = applyTransformers ( {
@@ -92,41 +93,45 @@ const config: Config = applyTransformers({
9293 } ,
9394 future : {
9495 v4 : true ,
95- experimental_faster : {
96- /**
97- * no config options for swcJsLoader so far.
98- * Instead configure it over the jsLoader in the next step
99- */
100- swcJsLoader : false ,
101- swcJsMinimizer : true ,
102- swcHtmlMinimizer : true ,
103- lightningCssMinimizer : true ,
104- rspackBundler : true ,
105- rspackPersistentCache : process . env . NETLIFY ? false : true ,
106- mdxCrossCompilerCache : true ,
107- ssgWorkerThreads : true ,
108- } ,
96+ experimental_faster : RUNS_IN_STACKBLITZ
97+ ? false
98+ : {
99+ /**
100+ * no config options for swcJsLoader so far.
101+ * Instead configure it over the jsLoader in the next step
102+ */
103+ swcJsLoader : false ,
104+ swcJsMinimizer : true ,
105+ swcHtmlMinimizer : true ,
106+ lightningCssMinimizer : true ,
107+ rspackBundler : true ,
108+ rspackPersistentCache : process . env . NETLIFY ? false : true ,
109+ mdxCrossCompilerCache : true ,
110+ ssgWorkerThreads : true ,
111+ } ,
109112 } ,
110113 webpack : {
111- jsLoader : ( isServer ) => {
112- const defaultOptions = require ( "@docusaurus/faster" ) . getSwcLoaderOptions ( { isServer } ) ;
113- return {
114- loader : 'builtin:swc-loader' , // (only works with Rspack)
115- options : {
116- ...defaultOptions ,
117- jsc : {
118- parser : {
119- ...defaultOptions . jsc . parser ,
120- decorators : true
114+ jsLoader : RUNS_IN_STACKBLITZ
115+ ? undefined
116+ : ( isServer ) => {
117+ const defaultOptions = require ( "@docusaurus/faster" ) . getSwcLoaderOptions ( { isServer } ) ;
118+ return {
119+ loader : 'builtin:swc-loader' , // (only works with Rspack)
120+ options : {
121+ ...defaultOptions ,
122+ jsc : {
123+ parser : {
124+ ...defaultOptions . jsc . parser ,
125+ decorators : true
126+ } ,
127+ transform : {
128+ ...defaultOptions . jsc . transform ,
129+ decoratorVersion : '2022-03' ,
130+ }
121131 } ,
122- transform : {
123- ...defaultOptions . jsc . transform ,
124- decoratorVersion : '2022-03' ,
125- }
126132 } ,
127- } ,
128- }
129- } ,
133+ }
134+ } ,
130135 } ,
131136
132137 // Even if you don't use internationalization, you can use this field to set
0 commit comments