@BrianDiPalma1 You mean in the loader? Seems likely but that's greenfield code (and can only import modules not scripts) @zenparsing @wycats
-
-
Replying to @lbljeffmo
@lbljeffmo Almost all of our current code is using ES modules so there is lots of code that right now is ES .js modules@zenparsing@wycats1 reply 0 retweets 0 likes -
Replying to @BrianDiPalma1
@BrianDiPalma1 me too :) When ready to stop compiling (i.e. no longer care about backcompat), we just rename to .mjs@zenparsing@wycats2 replies 0 retweets 0 likes -
Replying to @lbljeffmo
@lbljeffmo In dev I'd want to not compile and use latest JS engine but compile if testing in old ones@zenparsing@wycats1 reply 0 retweets 0 likes -
Replying to @BrianDiPalma1
@BrianDiPalma1 that works well (and Im advocating for that approach): Rename to .mjs, compile down to .js for backcompat@zenparsing@wycats2 replies 0 retweets 0 likes -
Replying to @lbljeffmo
@lbljeffmo@BrianDiPalma1@zenparsing that means even in the far future, upgrading a package means transpiling to .js2 replies 0 retweets 0 likes -
Replying to @wycats
@wycats upgrading a package means renaming to .mjs. Decide if you want to transpile only if you want backward compat@BrianDiPalma11 reply 0 retweets 0 likes -
Replying to @lbljeffmo
@lbljeffmo@BrianDiPalma1 renaming to .mjs breaks require()s in node10.2 replies 0 retweets 0 likes -
Replying to @wycats
@wycats only if users express ".js". require() vs require().default already means transparent isn't safe, tho@BrianDiPalma11 reply 0 retweets 0 likes -
Replying to @lbljeffmo
@wycats fortunately, with .mjs, you can do "module.exports = require('./foo.mjs').default;" in foo.js (no transpiling)@BrianDiPalma11 reply 0 retweets 0 likes
@lbljeffmo @BrianDiPalma1 let's chat in person in munich :)
-
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.