#javascript module idea: browserify transform to transpile CommonJS modules to ES6 modules. use in production piped to rollupify, #winning.
-
-
Replying to @ahdinosaur
because ES6 modules are a terrible idea, but http://rollupjs.org/ seems cool and i'd love to use it with CJS and browserify.
1 reply 0 retweets 0 likes -
Replying to @ahdinosaur
@yoshuawuyts think of all the bytes you'd save! ;) (this is me saying i'm not sure i can fussed to write this module myself)2 replies 0 retweets 0 likes -
Replying to @ahdinosaur
haha, but only if you have fat deps :p - could prob save some bytes, but https://github.com/yoshuawuyts/choo/blob/master/examples/mailbox/client.js … would prob not work in ES6 :(
1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts
why wouldn't it work? the point would be to remove unnecessary module closures (38+ bytes per module) and unused module exports
2 replies 0 retweets 0 likes -
Replying to @ahdinosaur
Oh, I meant the inline require() statements in the example I linked
1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts
still statically analyzable, otherwise browserify wouldn't be able to traverse the require tree. as opposed to `require(stuff)`
2 replies 0 retweets 1 like -
Replying to @ahdinosaur @yoshuawuyts
you could pull it out as a top-level ES6 module import to a variable, then replace require with the var, and it'd be the same.
2 replies 0 retweets 1 like -
-
Replying to @yoshuawuyts
but but but.... this was me trying to get **you** to do it. :p maybe, but to be honest i have other priorities at the moment.
1 reply 0 retweets 0 likes
hahaha, wellll I should be writing a workshop for a certain conference instead of working on frontend things, butttttt :p
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.