Release

Coralite v0.28.2 Released

Coralite v0.28.2 introduces the static asset plugin for copying binary dependencies, unifies client-side script execution contexts, and refactors internal save options.

TD
Thomas David March 16, 2026

Coralite v0.28.2 is now available. This release introduces a static assets plugin to handle binary dependencies like WebAssembly, refactors client-side script execution parameters, updates the DOM generation behavior for the Refs plugin, and refines programmatic APIs.

Static Assets Plugin for Binary Dependencies

To support components that rely on compiled assets, we have introduced staticAssetPlugin. The plugin copies binary dependencies (such as .wasm files) from package directories directly into the build output folder during compilation.

Unified Client-Side Script Context

We have refined the JSDoc comments and TypeScript definitions to clearly differentiate between server-side setup functions and client-side script execution within Coralite modules. In addition, the signature of the client-side script callback has been updated to accept a unified context object instead of separate values and refs parameters. This context includes a helpers property to expose plugin helper methods within scripts.

javascript
Code copied!
  import { defineComponent } from 'coralite';
  
  export default defineComponent({
    setup(props) {
      // Runs on the server during rendering
      return { userId: props.id };
    },
    script(context) {
      // Runs on the client
      const { values, refs, helpers } = context;
      console.log('Client-side script initialized with values:', values);
    }
  });

Internal Options for Coralite Save Method

The Coralite.prototype.save method has been refactored to read configuration options internally. The builder now checks this.options.output and throws an error if it is missing. This eliminates the need to pass arguments directly to the save function, simplifying CLI usage and test scripts.

javascript
Code copied!
  import Coralite from 'coralite';
  
  const coralite = new Coralite({
    output: './dist'
  });
  
  // No arguments required; output path is read from initialization options
  await coralite.save();

Refs Plugin Output and Testing Patterns

To improve browser delivery, the Refs plugin now removes ref attributes from the final DOM output during SSR builds in favor of auto-generated IDs. If you are targeting these components in end-to-end testing suites like Playwright or Cypress, avoid using [ref="name"] selectors. Instead, target elements using the structured ID pattern:

text
Code copied!
__-
    

Breaking Changes

  • Unified Script Parameters: The client-side script function now receives a single context object rather than separate values and refs arguments. Existing scripts must be updated to use the new unified parameter format.
  • Coralite Save Signature: Coralite.prototype.save() now requires the output directory to be specified when initializing the Coralite instance. Calling save without configuration options pre-defined will throw an error.
  • SSR Ref Attribute Removal: ref attributes are no longer emitted in the final DOM output. External testing suites must select elements via generated IDs rather than ref selectors.

How to Upgrade

To upgrade to the latest version, update your project dependencies:

bash
Code copied!
  npm install coralite@0.28.2
bash
Code copied!
  npm install coralite-scripts@0.28.2
TD

Thomas David

Creator of Coralite. Writing about the intersection of native web APIs, compiler design, and AI-assisted development.