@@ -255,6 +255,8 @@ let createUrl = (pathName, ready) => {
255
255
url
256
256
}
257
257
258
+ let defaultModuleSystem = "esmodule"
259
+
258
260
// ~initialLang:
259
261
// The target language the compiler should be set to during
260
262
// playground initialization. If the compiler doesn't support the language, it
@@ -268,7 +270,7 @@ let createUrl = (pathName, ready) => {
268
270
// cases where the output didn't visually change)
269
271
let useCompilerManager = (
270
272
~initialVersion : option <Semver .t >= ?,
271
- ~initialModuleSystem = "esmodule" ,
273
+ ~initialModuleSystem = defaultModuleSystem ,
272
274
~initialLang : Lang .t = Res ,
273
275
~onAction : option <action => unit >= ?,
274
276
~versions : array <Semver .t >,
@@ -485,7 +487,11 @@ let useCompilerManager = (
485
487
let apiVersion = apiVersion -> Version .fromString
486
488
let open_modules = getOpenModules (~apiVersion , ~libraries )
487
489
488
- let config = {... instance -> Compiler .getConfig , ?open_modules }
490
+ let config = {
491
+ ... instance -> Compiler .getConfig ,
492
+ module_system : defaultModuleSystem ,
493
+ ?open_modules ,
494
+ }
489
495
instance -> Compiler .setConfig (config )
490
496
491
497
let selected = {
0 commit comments