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.
Asked
Active
Viewed 3,293 times
2 Answers
5
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.

Sébastien Rosset
- 1,481
- 1
- 10
- 17
2
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.

G. Tranter
- 16,766
- 1
- 48
- 68