fetch-element and slotted-element web components to expose fetch() functionality, render JSON as HTML and support fetch() lifecycle via slot without ShadowDOM
As slotted-element.js has dependencies on css-chain, just compiling binary would work only when loaded with import maps. The import map entries which would be revision-aware and have to be published along with release
as part of README and
as config JSON.
Demo html
has to be changed to consume generated import maps
Bundled ESM
Would reduce the number of JS calls and eliminate the need for import maps as JS URL on CDN would be sufficient.
export all dependencies
To keep all modules (slotted-element, fetch-element, CssChain, ApiChain) available, each entry would be exported from dist/bundle/slotted-element.js bundle module.
type definitions and JSDoc for bundle
? When imported from bundle, it would be handy to have the type definitions and JSDocs available in same manner as module level ones.
binary ESM in CDN
As
slotted-element.js
has dependencies oncss-chain
, just compiling binary would work only when loaded with import maps. The import map entries which would be revision-aware and have to be published along with releaseDemo html
has to be changed to consume generated import maps
Bundled ESM
Would reduce the number of JS calls and eliminate the need for import maps as JS URL on CDN would be sufficient.
export all dependencies
To keep all modules (slotted-element, fetch-element, CssChain, ApiChain) available, each entry would be exported from
dist/bundle/slotted-element.js
bundle module.type definitions and JSDoc for bundle
? When imported from bundle, it would be handy to have the type definitions and JSDocs available in same manner as module level ones.
links
Slack question: https://lit-and-friends.slack.com/archives/C03PF4L4L/p1647160319947189