Publish a component
This page describes how to publish a LitElement component to npm.
Publishing to npmPermalink to “Publishing to npm”
To publish your component to npm, see the instructions on contributing npm packages.
Your package.json configuration should have both the
You should also create a README describing how to consume your component. A basic guide to consuming LitElement components is documented at Use a component.
Transpiling with TypeScriptPermalink to “Transpiling with TypeScript”
The following JSON sample is a partial tsconfig.json that uses recommended options for targeting ES2017:
See the tsconfig.json documentation for more information.
Transpiling with BabelPermalink to “Transpiling with Babel”
Install Babel and the Babel plugins you need. For example:
Configure Babel. For example: