HT.JS

Vite plugin

HT.JS has its very own fully-featured Vite plugin

vite-plugin-html-pages Generate static HTML pages from JavaScript using Vite.

Write pages as `.ht.js` or `.ht.ts` files and build fast, predictable websites with zero runtime and no framework.

> All the benefits of modern tooling, none of the framework overhead.

Installation & Quick Start

npm install vite vite-plugin-html-pages javascript-to-html

vite.config.mjs

import { defineConfig } from 'vite';
import htmlPages from 'vite-plugin-html-pages';

export default defineConfig({
    plugins: [
        htmlPages({
            pagesDir: 'src',
            cleanUrls: true
        }),
    ]
});

Features