Conflating a unit of code organization (ES6 module) with a unit of code delivery (HTML import) is a mistake.https://twitter.com/slightlylate/status/792014657506516992 …
-
-
Replying to @cramforce
@slightlylate yes indeed. Classic solution is “config map” that maps org names into delivery names. Why not use for HTML+ES6 mods1 reply 0 retweets 0 likes -
Replying to @awbjs @slightlylate
there are a lot of good & bad solutions to this problem. All current solutions must compile away the ES6 modules.
2 replies 0 retweets 1 like -
that is very sad, indeed, because it kills interop (such as loading some modules from a CDN).
1 reply 0 retweets 3 likes -
Replying to @cramforce @slightlylate
Note that ES6 module specifiers (import “foo”;) can be treated as logical rather than physical identifiers.
3 replies 0 retweets 0 likes -
Replying to @awbjs @slightlylate
I understand. Efficient delivery requires that there are few requests on HTTP layer. No way to do that with ES6 modules
2 replies 1 retweet 0 likes -
Replying to @cramforce @slightlylate
that’s why ES6 modules are statically specified. Logical depenencies can be can be statically analyzed and bundled.
1 reply 0 retweets 0 likes -
Replying to @awbjs @slightlylate
how do you bundle ES6 modules, though? Today’s bundlers do it, by removing the modules from the code.
2 replies 1 retweet 1 like -
Replying to @cramforce @slightlylate
define a file format that aggregates them, include a map. (Some would say, a zip file is all you need)
2 replies 0 retweets 2 likes -
I hope application/package will be the solution https://www.w3.org/TR/web-packaging/ …
1 reply 0 retweets 2 likes
: our team is restarting work on this. Expect a proposal to WICG soon.
/cc @awbjs @cramforce
-
-
hooray! We were considering not only implementing this, but also using it for assetgraph serialization
0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
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.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.