Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for lit 2 components? #234

Open
baermathias opened this issue Nov 12, 2021 · 1 comment
Open

Support for lit 2 components? #234

baermathias opened this issue Nov 12, 2021 · 1 comment

Comments

@baermathias
Copy link

Does this tool already support lit 2.x?

If I run wca analyze on a project which uses new lit version and does the import statements like below, then it doesn't create the custom-elements.json, but also gives no error message:

import { css, html, LitElement, TemplateResult } from 'lit'
import { property } from 'lit/decorators.js'

But if I run it on a project where files are imported from lit-element, it creates the custom-elements.json and describes the properties, attributes and events.

import { html, LitElement, TemplateResult, state, property, customElement, css } from 'lit-element'
@gavinbarron
Copy link

Based on my test it appears to work for lit^2.3.1
We're just in the process of upgrading to lit v2 and use this library. Our usage of the analyzer does not appear to have been broken
PR upgrading to lit 2 microsoftgraph/microsoft-graph-toolkit#1810
If you use yarn to install the dep and then run yarn build:mgt-react from the root you'll see /packages/mgt-react/temp/web-components.json is generated as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants