I'd prob use it if they support CommonJS. using static import statements feel weird especially on server side.
import
At least import follows the ECMAScript specifications!
Well, technically, require does follow ECMAScript specifications because it is a valid Javascript function. But, I see your point on that.
require
Require isn't part of the ECMA specifications, it's part of CommonJS. As read here when you enable ES modules for your package.
I think they mean that is syntactically/semantically looks like just a global function (even it if is not implemented as such in node). In fact, that's what it was in web commonjs.
It does support it. Deno standard library has support for โrequireโ, deno.land/std@0.73.0/node
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'd prob use it if they support CommonJS. using static
importstatements feel weird especially on server side.At least
importfollows the ECMAScript specifications!Well, technically,
requiredoes follow ECMAScript specifications because it is a valid Javascript function. But, I see your point on that.Require isn't part of the ECMA specifications, it's part of CommonJS. As read here when you enable ES modules for your package.
I think they mean that is syntactically/semantically looks like just a global function (even it if is not implemented as such in node).
In fact, that's what it was in web commonjs.
It does support it. Deno standard library has support for โrequireโ, deno.land/std@0.73.0/node