An unplugin wrapper around the Stencil compiler for use with Vite, Webpack, Rollup, esbuild, Nuxt, and other build tools. Version 0.4.1 is the current stable release. It provides a unified plugin interface across multiple bundlers, enabling Stencil component compilation in non-Stencil projects. Key differentiators: supports source maps (since 0.4.0), serializes builds to prevent stale output, and works with Astro, rspack, and Vue CLI. Peer dependencies include @stencil/core ^4.29.3 and various build tool versions. Release cadence is irregular; latest fixes address process.exit in writeBundle and Windows path support.
npm install unplugin-stencilVerified import paths — ran on the pinned version, not inferred.
Shows how to integrate unplugin-stencil with Vite using TypeScript. The plugin accepts Stencil compiler options as an argument.
Update any custom build logic to use `getLatestBuild` and adjust for event-driven queue pattern.
Migrate to Nuxt 3 if possible.
Upgrade to version 0.3.4 or later.
Upgrade to 0.2.9 or later.
Ensure you have installed the package: npm install unplugin-stencil and use import stencil from 'unplugin-stencil/vite'.
Use stencil({ options }) as a function call in your plugins array.Upgrade to 0.4.1 which fixes this issue.