Support for .mjs files (ESM module loader)


#1

Hi,

Node v8.5 shipped the ESM module loader feature behind a flag: node --experimental-modules index.jsm
It seems that you’re not currently supporting .mjs files at all.
No syntax highlighting and no hot reload are available for this type of files.

Is there any plan to support that feature?

Cheers.


#2

I imagine so, yes. In the meantime, you can configure which file types trigger a restart on edit with use of a watch.json file. See https://glitch.com/faq#restart

Syntax highlighting comes from our use of CodeMirror, so our support for it is downstream of their support.


#3

Alright!

The watch.json config goes already a long way.
Thanks for your help Gareth.

Cheers!