October 24, 2022
  • Stencil
  • release
  • stencil

Announcing Stencil 2.19.0

Mike Hartington

Director of Developer Relation...

A featured image for the Stencil 2.19.0 release.

Hey folks! We’re excited to share that Stencil v2.19.0 is here! This is a minor release and should be a drop-in replacement for existing projects. There are a few bug fixes in this release as well as some new features that folks may be excited about. Let’s dive in.

ES2022+ Compilation

Previously when trying to target ESNext or ES2022, some changes in TypeScript’s compiler that had been introduced a while ago, would cause @State to misbehave. Basically, any @State members would no longer trigger a re-render of your component. After some research into what happened, this has been fixed! So if you were following #3130 on GitHub, it’s time to celebrate!.

Markdown Improvements

One of the best features of Stencil (aside from the compiler) is the built-in documentation tooling that is part of the build process. While you build your components, Stencil will generate the documentation based on the component itself, as well as various JSDoc comments within the component. But if you wanted to include some content before the component as a sort of overview, this wouldn’t be included in the docs output. Thankfully, this has been resolved in v2.19. So a component like this:

* This is my component
* @slot someSlot - Slot desc
* @part partName - Part desc
@Component({ ... })
export class MyComponent {...}

The generated documentation will be

# my-component
## Overview
This is my component


And that’s all for now! For a complete list of bug fixes, check out the Stencil v2.19.0 release notes here. Cheers!

Mike Hartington

Director of Developer Relation...