lit / lit

Lit is a simple library for building fast, lightweight web components.

Home Page:https://lit.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[all] single bundled, downloadable distribution please

khoan opened this issue · comments

commented

would be handy for developing offline, e.g. long train rides with choppy interweb.

Thanks.

Once you install with npm you can work offline, just like if you downloaded a bundle you could work offline. What are the different constraints for you?

FYI, we're unlikely to pursue strategies here that only work for leaf modules and not for modules that depend on lit-html, especially lit-element. If we claim you can use lit-html w/o a package manager or decent dev server, but you can't when using lit-element, then we've exaggerated on a practical level that I'm not comfortable with. Since lit-element imports lit-html, we need a solution that allows for resolving bare import specifiers.

Right now npm i and a dev server like es-dev-server do that quite well and work offline, so we need more information about why that wouldn't work.

hey @justinfagnani, the general assertion and problem here seems to be the added requirement of non-static set of assets, specifically a transformative process or service, or anything that doesn't just work in a browser given whatever environment it's pulled into. Bare imports, package management and whatever middleware were/are generally assumed to be distinct from consuming most frontend javascript. In my case I'd prefer to serve up from Deno and get rid of Node entirely. Preferences aren't so much the point as what isolates concerns and eases adoption. If that's not an aim of lit-things then this probably isn't much use to comment about, and is a common issue in frontend projects--implementation requires some toolkit. When I've migrated to various platforms (rpi arm64, arm32, apple-silicon, various major versions of Nodejs) these create problems and in my opinion unnecessary complexity that I've been blocked by several times. Distributing a bundle of directly importable javascript files is ideal.

Our plan is to publish a few pre-configured bundles to lit.dev

Our plan is to publish a few pre-configured bundles to lit.dev

Specifically, I think we'll plan on adding two bundles:

  • A lit.min.js bundle that bundles and exports only the code currently loaded by the lit entrypoint (i.e., excludes decorators, directives, polyfill-support, etc.)
  • A lit.max.js bundle that exports the kitchen sink -- including decorators, directives, and polyfill-support

So it seems this would this effectively address the request made in https://github.com/lit/lit-element/issues/603?

Since #2272 has a bit more conversation, I transferred it to the lit/lit repo and I'm going to close this in favor of it.