Between .mjs and package.json: Both are viable technical solutions. The debate is about whether we want config vs convention.
@lbljeffmo it's not simple to newly make "CJS or standard" part of the public interface.
-
-
@wycats I don't follow? -
@wycats People *write* ES today but they only *run* CJS. Both proposals leave that capability in tact + add support for new runtimes to run -
@wycats neither requires a change to the pub interface -- both only amend the options for a pub interface -
@lbljeffmo require("../foo.js") currently means "require a module" - w/ .mjs it means "require a CJS module" -
@lbljeffmo same with require("lodash/array.js") -
@wycats Indeed -- that's kind of the point of the ".mjs" proposal: Know immediately what kind a module is by it's name. -
@lbljeffmo right, which makes this incorrecthttps://twitter.com/lbljeffmo/status/726236426510163968 … -
@wycats adding support (but not requirement) for require("./foo.mjs") does not the public interface, it amends the options for one - 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.