
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
@hono/vite-ssg
Advanced tools
@hono/vite-ssg
is a Vite plugin to generate a static site from your Hono application.
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
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()],
})
Just run vite build
.
npm exec vite build
Or
bunx --bun vite build
Run the wrangler
command.
wrangler pages deploy ./dist
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: [],
}
MIT
FAQs
Vite plugin to generate a static site from your Hono application
The npm package @hono/vite-ssg receives a total of 1,052 weekly downloads. As such, @hono/vite-ssg popularity was classified as popular.
We found that @hono/vite-ssg demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.