BoxLang 🚀 A New JVM Dynamic Language Learn More...

Coldspa

v0.2.0 Modules

Coldspa

bathtub

Give your CFML a spa day. The Islands Architecture for ColdFusion.


Mount Vue or React components into CFML pages with server-side rendering and progressive hydration.

Install

CFML side (via CommandBox / ForgeBox):

box install coldspa

Node side (Vite plugin + SSR sidecar):

npm install coldspa vite vue   # or: react react-dom

Setup

Register the module's directory as a custom tag path so <cf_Island> and <cf_Slot> resolve from anywhere in your app, and delegate to coldspa.Bootstrap from your lifecycle methods so Coldspa can boot the Vite + SSR sidecar processes:

// Application.cfc
component {
    this.name = "MyApp";
    this.customTagPaths = expandPath("/modules/coldspa");

    function onApplicationStart() {
        new coldspa.Bootstrap().onApplicationStart();
        return true;
    }

    function onApplicationStop() {
        new coldspa.Bootstrap().onApplicationStop();
    }

    function onRequestStart(targetPage) {
        new coldspa.Bootstrap().onRequestStart();
        return true;
    }
}

ColdBox users can skip this — the bundled ModuleConfig.cfc registers the custom tag path and wires the bootstrap lifecycle automatically.

Configure Vite

// vite.config.js
import { defineConfig } from 'vite';
import coldspa from 'coldspa/vite';

export default defineConfig({
    plugins: [
        coldspa({
            frameworks: ['vue'],            // or ['vue', 'react']
            globs: { vue: '/src/**/*.vue' } // where your components live
        })
    ]
});

Use it from CFML

<cfinclude template="/coldspa/renderers/Vue.cfm">

<cf_Island
    framework="#Vue#"
    path="./src/App.vue"
    props="#{ hello: 'World' }#"
    strategy="visible">

    <p>Default-slot content rendered by CFML.</p>

    <cf_Slot name="header">
        <h2>Header from CFML</h2>
    </cf_Slot>
</cf_Island>

That's it — start your CF server and load the page. coldspa.Bootstrap auto-spawns the Vite dev server and Node SSR sidecar in the background and tears them down on app stop. For Docker, supervised deployments, or opting out, see Getting started.

Documentation

See https://github.com/crutchcorn/coldspa#readme for setup. Non-ColdBox apps must add this.customTagPaths = expandPath("/modules/coldspa"); to Application.cfc. Requires the companion npm package coldspa for the Vite plugin and Node SSR sidecar.

$ box install coldspa

No collaborators yet.
     
  • {{ getFullDate("2026-05-04T10:17:12Z") }}
  • {{ getFullDate("2026-05-04T11:13:44Z") }}
  • 28
  • 0