Coralite v0.25.0 Released
I am excited to announce the release of Coralite v0.25.0! This update introduces a new option to exclude elements from rendering, powerful new plugin hooks for interacting with the build and render processes, a switch to an ESM bundler format, and an important breaking change to normalize our hook naming conventions.
Skip Render By Attribute #
This release introduces a new skipRenderByAttribute option to CoraliteOptions and the
CLI (-s, --skip-render-attribute). This feature allows you to parse tags but exclude
them from the final render output.
Elements meeting the specified attribute criteria will be parsed and evaluated normally, but they will be stripped right before the final HTML generation. This is extremely useful for keeping certain components or metadata in the AST without making them visible in the final HTML output.
New Plugin Hooks #
We've introduced two new plugin hooks to allow for powerful mutations of the AST and configuration:
- onBeforePageRender: Triggered just before rendering a page, giving you the ability to alter context data specific to that page.
- onBeforeBuild: Triggered before the entire build process starts, allowing plugins to modify the build process globally.
ESM Bundler Format #
The Script Manager's Rollup build format has been changed from IIFE to ESM to support modern
module loading. We've also added external configuration to prevent bundling of http:// and
https:// imports.
This update allows for seamless external library imports via plugin and component client script imports, drastically improving integration with modern dependencies.
Breaking Change: Hook Renaming #
To normalize the naming pattern with other lifecycle hooks (like onBeforeBuild and
onAfterPageRender), we have renamed the onBuildComplete hook to
onAfterBuild.
If you have authored or are maintaining a Coralite plugin, you will need to update your plugin definitions and
hook registrations to use onAfterBuild instead.
How to Upgrade #
To upgrade to the latest version, update your project dependencies:
npm install coralite@0.25.0
npm install coralite-scripts@0.25.0
