@@ -255,6 +255,8 @@ let createUrl = (pathName, ready) => {
255255 url
256256}
257257
258+ let defaultModuleSystem = "esmodule"
259+
258260// ~initialLang:
259261// The target language the compiler should be set to during
260262// playground initialization. If the compiler doesn't support the language, it
@@ -268,7 +270,7 @@ let createUrl = (pathName, ready) => {
268270// cases where the output didn't visually change)
269271let useCompilerManager = (
270272 ~initialVersion : option <Semver .t >= ?,
271- ~initialModuleSystem = "esmodule" ,
273+ ~initialModuleSystem = defaultModuleSystem ,
272274 ~initialLang : Lang .t = Res ,
273275 ~onAction : option <action => unit >= ?,
274276 ~versions : array <Semver .t >,
@@ -485,7 +487,11 @@ let useCompilerManager = (
485487 let apiVersion = apiVersion -> Version .fromString
486488 let open_modules = getOpenModules (~apiVersion , ~libraries )
487489
488- let config = {... instance -> Compiler .getConfig , ?open_modules }
490+ let config = {
491+ ... instance -> Compiler .getConfig ,
492+ module_system : defaultModuleSystem ,
493+ ?open_modules ,
494+ }
489495 instance -> Compiler .setConfig (config )
490496
491497 let selected = {
0 commit comments