sijo jose
sijo jose

Reputation: 327

Bundling stencil component with webpack

Do anyone know how to bundling the web component created with stencil using webpack. I have multiple stencil components and need to create a bundle so that i can use it in other projects.

Upvotes: 6

Views: 3771

Answers (2)

Sébastien Rosset
Sébastien Rosset

Reputation: 1531

Ionic has developed a StencilPlugin for webpack, which allows to easily import components using the webpack bundler.

You may also be interested in this excellent article which explains in more details how to use the plugin.

Upvotes: 5

G. Tranter
G. Tranter

Reputation: 17918

The stencil build command normally bundles everything for you into the components.js file (or whatever your stencil config's namespace value is). So you shouldn't need to create your own bundle. If you are finding problems with the Stencil-built bundle, maybe have a look at https://stenciljs.com/docs/module-bundling.

Upvotes: 2

Related Questions