Provides a way to build web component as distributable library
See original GitHub issueI don’t know if it could be a feature request or a question, but anyway…
At the moment, the different build options (rollup+webpack) provide us the capacity to build an app or a demo because the build tools takes the index.html
file as entry point. But here is another common use case for developers which just consists into build a component as a distributable library (production-ready) that they could then deploy to a NPM registry.
It seems that this UC is not covered but maybe I missed something?
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Developing Components: Publishing
Open Web Components provides a set of defaults, recommendations and tools to help facilitate your Web Component.
Read more >Implement a UI library with Web Components - Medium
The first way to import the library is called distribution. ... standard web components, and provided great build tools to distribute them; ...
Read more >From Web Component to Lit Element - Google Codelabs
Lit is a simple library for building fast, lightweight web components that work in any framework, or with no framework at all. With...
Read more >Distribution Output Target - Stencil.js
Distribution Output Target. The dist type is to generate the component(s) as a reusable library that can be self-lazy loading, such as Ionic....
Read more >How to create a WebComponent in ANY Framework - YouTube
In this javascript tutorial video we look at the WebComponents.dev website which provides 34 templates for creating webcomponents in pretty ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is an area we intend to cover very soon.
In general es modules + code that runs in modern browsers is what you want to publish for libraries and web components. If you are using non standard code like typescript, you will need to compile that away, but there is no need to do any es5 or bunding. All modern browsers support es modules, classes, async functions etc. Your consumers know best how to optimize for their users.
https://justinfagnani.com/2019/11/01/how-to-publish-web-components-to-npm/ is a good read and covers mostly our point of view.
Thanks. Will close this one and track the other issue in the new one.