vscode-macros icon indicating copy to clipboard operation
vscode-macros copied to clipboard

Allow ECMAScript module syntax

Open BurtHarris opened this issue 2 years ago • 2 comments

It would be a good idea to permit ECMA-style import and export statement in macro files

BurtHarris avatar Jul 05 '22 17:07 BurtHarris

I may be on the track of this one, using require() vs. include() in the extension.

BurtHarris avatar Jul 05 '22 19:07 BurtHarris

Hmm. If someone wants to write their macros using the ECMA module syntax, they may need to name the javascript in a .mjs file. Based on what I read, CommonJS modules can import ECMA modules, but not the other way around.

BurtHarris avatar Jul 06 '22 02:07 BurtHarris