Coralite v0.28.3 Released

Coralite v0.28.3 has been released. This update introduces native support for copying static assets during the build process, featuring integration for the new static asset plugin, support for copying assets from external packages, and a command-line option to specify assets dynamically.

Native Support for Package Assets #

This release integrates the new staticAssetPlugin directly into the core Coralite builder. This enables projects to automatically copy static assets from external NPM packages into the output directory during the build lifecycle.

A new assets configuration option accepts an array of {pkg, path, dest} objects. The builder ensures the static asset plugin is initialized first in the plugin chain to guarantee that all assets are copied and available for subsequent compilation steps.

javascript
Code copied!
  // coralite.config.js
  export default {
    assets: [
      {
        pkg: 'my-design-system',
        path: 'dist/assets/fonts',
        dest: 'public/fonts'
      }
    ]
  };

Dynamic Asset Specification via CLI #

In addition to config-based setup, a new --assets command-line option has been added to the build command. This option allows users to provide a JSON string array of static assets to copy during the build process, enabling direct asset inclusion without manual post-build tasks.

The parser includes validation for the input array, returning clear error feedback if the JSON is malformed or invalid.

bash
Code copied!
  npx coralite build --assets '[{"pkg": "my-design-system", "path": "dist/logo.svg", "dest": "public/logo.svg"}]'

Improved Validation and API Documentation #

Asset parsing has been refactored to support a more flexible package:path:dest string format. Full end-to-end (E2E) test coverage has been added for the staticAssetPlugin, alongside unit tests verifying the plugin initialization order. To support TypeScript and editor integrations, the CoraliteStaticAsset type has been added to types/core.js and JSDoc comments have been documented on the plugin function.

How to Upgrade #

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

bash
Code copied!
  npm install coralite@0.28.3
bash
Code copied!
  npm install coralite-scripts@0.28.3

Related posts

More blog posts

Start Building with Coralite!

Use the scaffolding script to get jump started into your next project with Coralite

Copied commandline!