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

Install into dependencies or devDepenendies? #1302

Closed
damil42 opened this issue Feb 2, 2024 · 2 comments
Closed

Install into dependencies or devDepenendies? #1302

damil42 opened this issue Feb 2, 2024 · 2 comments

Comments

@damil42
Copy link

damil42 commented Feb 2, 2024

npm i lit

as currently in docs for installing this into dependencies of package.json.

or

npm i -D lit

which will install it into devDependencies?

I'm new in lit and just wonder, if this is a runtime library or compiling library. If this is only a library required during development, it should be installed with -D into devDependencies. If this library is included in the build and run in browser then keep it as it is.

@augustjk
Copy link
Member

augustjk commented Feb 2, 2024

If you're making components with Lit, it is meant to be used in runtime so it is a regular dependency, not a dev dependency. However, the size is very small as it takes advantage of existing platform features.

Lit is meant to work without any compile or build step. It's published as JavaScript modules to work directly in modern browsers. Of course, users can choose to use TypeScript with a compiler or other build tools for the benefits they bring.

There is a @lit-labs/compiler package but it's optional and only meant to offload initial template preparation step. It'll still require Lit client code for updates.

@damil42
Copy link
Author

damil42 commented Feb 2, 2024

Ok, thanks for the clarification.

@damil42 damil42 closed this as completed Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants