How to import customElement, property from bundle
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 142
- Forks
- 230
- PR merge metrics
- No merged PRs in 30d
Description
In the docs i'm told to use:
import {LitElement, html} from 'lit';
import {customElement, property} from 'lit/decorators.js';
but if i'm using bundle, only
import {LitElement, html} from 'https://cdn.jsdelivr.net/gh/lit/dist@3/core/lit-core.min.js';
is given.
how do i import customElement and property from jsdelivr.
I can see there is a file "lit-all" at https://cdn.jsdelivr.net/gh/lit/dist@3.1.4/all/ but it doesn't seem to export customElement or property, and neither does lit-core, i get the error
Module '"https://cdn.jsdelivr.net/gh/lit/dist@3.1.4/all/lit-all.min.js"' has no exported member 'property'
Is the decorator module hosted elsewhere?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the documented imports with the lit-core.min.js and lit-all.min.js URLs mentioned in the issue, focusing on whether either bundle exports customElement and property. The documentation is done when it gives a verified jsDelivr import or clearly explains where the decorator module is hosted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation, web-dev
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100