Can't find it in the docs, so here's my gross hack to get LitElement built for simple prototyping:
> git clone https://github.com/Polymer/lit-element.git …
> cd lit-element
> npm install
> npm run build
> ./node_modules/rollup/bin/rollup -c
> ls lit-element.bundled.js
/cc @justinfagnani @DevDocDude
-
-
What about: import {LitElement, html} from 'https://cdn.pika.dev/lit-element/latest …'; Or import {LitElement, html} from 'https://unpkg.com/lit-element@2.2.1/lit-element.js?module …'; Cc
@FredKSchott1 reply 0 retweets 7 likes -
Replying to @0xcda7a @justinfagnani and
Unpkg failed for me (CORS issue)
2 replies 0 retweets 1 like -
Replying to @slightlylate @0xcda7a and
Pika CDN was built exactly for this use-case! Hope it worked for you. Be aware: lit-html expects deep references into the package (for directives, I believe) which won't be supported on the CDN until the conditional exports spec gets further along.
1 reply 0 retweets 2 likes -
Replying to @FredKSchott @slightlylate and
Can you give an example of a usage that might break?
1 reply 0 retweets 1 like -
Replying to @0xcda7a @slightlylate and
It's only the directives that lit comes with, seen at the bottom of https://lit-html.polymer-project.org/api/index.html . Since we only serve the main entrypoint, those directives are not available on the CDN. Everything else should be though. /cc
@justinfagnani1 reply 0 retweets 2 likes
Pika worked great. Thank you!
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.