Stencil Output Targets: When to Split Your Component Bundle
Stencil's build configuration controls whether components ship as one bundle or individually loadable files. Learn how to configure dist-custom-elements and verify the result.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Stencil's build configuration controls whether components ship as one bundle or individually loadable files. Learn how to configure dist-custom-elements and verify the result.
Author once in Stencil and emit Custom Elements plus React, Angular and Vue wrappers from one stencil.config.ts. Learn how to configure outputTargets, verify artifacts, and manage Shadow DOM and SSR trade-offs.
Goal Publish a Stencil component library that will be consumed inside a server-side rendering framework, where components must render on the server and hydrate on the client without duplicate custom element registration. Constraints and uncertainty The default dist output target code-splits each component into its own lazy-loaded chunk, loaded on demand when
StencilJS 'dist' vs 'dist-custom-elements': Resolving Asset URLs in Subpath Deployments The goal is to ensure that images, fonts, and CSS referenced by components load correctly when a StencilJS application is deployed to a subpath (e.g., /app/ ) rather than the site root. In development, stencil dev serves components with unminified CSS and absolute URLs, w