Skip to content Skip to sidebar Skip to footer

Creating A Standalone Web Component Build Using As An Iife

I have create a web component for displaying gists generally in any html content. I used the Lit Element Typescript Starter Project as a baseline and it comes with a rollup.config.

Solution 1:

Rollup configs really depend on what you want to do. If it works currently for what you want to do, then that's great and nothing needs to be changed.

Since it's a config file, if it's not working, everything else is up to you and what you want out of it. For example, maybe if you want to make it work on older browsers, you would use the plugin @rollup/plugin-babel to transpile your code. If you want to offer it as umd and es, you could add those to the build steps.

The rollup documentation is pretty extensive, and you should look through what's possible: https://rollupjs.org/guide/en/

Once you have a better idea of your project's needs, you can search through the docs for examples of how to add specific plugins, steps, etc.

Post a Comment for "Creating A Standalone Web Component Build Using As An Iife"