Socket
Book a DemoInstallSign in
Socket

@hono/vite-ssg

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hono/vite-ssg

Vite plugin to generate a static site from your Hono application

latest
Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
1.3K
-0.77%
Maintainers
1
Weekly downloads
 
Created
Source

@hono/vite-ssg

@hono/vite-ssg is a Vite plugin to generate a static site from your Hono application.

Usage

Installation

You can install vite and @hono/vite-ssg via npm.

npm i -D vite @hono/vite-ssg

Or you can install them with Bun.

bun add vite @hono/vite-ssg

Settings

Add "type": "module" to your package.json. Then, create vite.config.ts and edit it.

import { defineConfig } from 'vite'
import ssg from '@hono/vite-ssg'

export default defineConfig({
  plugins: [ssg()],
})

Build

Just run vite build.

npm exec vite build

Or

bunx --bun vite build

Deploy to Cloudflare Pages

Run the wrangler command.

wrangler pages deploy ./dist

Options

The options are below.

type SSGOptions = {
  entry?: string
  /**
   * Hono SSG plugins to use.
   * These are not Vite plugins, but plugins for Hono's static site generation.
   * @see https://hono.dev/docs/helpers/ssg#plugins
   */
  plugins?: SSGPlugin[]
}

Default values:

const defaultOptions = {
  entry: './src/index.tsx',
  plugins: [],
}

Authors

  • Yusuke Wada https://github.com/yusukebe

License

MIT

FAQs

Package last updated on 10 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.