es6console icon indicating copy to clipboard operation
es6console copied to clipboard

Support ES6 modules

Open borekb opened this issue 8 years ago • 4 comments

The console is awesome! Would it be possible to add support for ES6 modules and imports?

borekb avatar Oct 10 '17 09:10 borekb

I am wondering why would need support for imports, could you elaborate on your use case? Most of the time people would use the console to see a specific transformation of ES6 -> ES5 to better understand the inner workings of new language features.

matthisk avatar Oct 10 '17 11:10 matthisk

You also have transpilers, e.g., TypeScript, and some language features only work when code is in multiple files, being imported as modules. Might be out of scope for es6console but I didn't find any other online JS / TS playgrounds that would support this easily so I thought I'd suggest it here :)

borekb avatar Oct 10 '17 12:10 borekb

Ok interesting use case (which language features are these?). Unfortunately this would entail adding support for multiple files within this editor, which would be quite some work. Also the actual imports would have to be transpiled to the new import api, meaning we would have to build a custom transpilation step, again quite a lot of work.

matthisk avatar Oct 10 '17 12:10 matthisk

Understood. Still, thanks for taking the time to respond, and es6console is already awesome (I didn't know about it in the sea of js fiddles, codepens etc., but I have to say it's very nice).

borekb avatar Oct 10 '17 12:10 borekb