🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@site-index/vite-plugin

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@site-index/vite-plugin

Vite integration layer for site-index serve/build pipelines.

latest
Source
npmnpm
Version
0.1.5
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@site-index/vite-plugin

Vite integration layer for site-index serve and build pipelines.

npm version Code Quality Code Coverage Socket

Repository README

Install

npm install -D @site-index/vite-plugin

Requirements:

  • Node.js >=22
  • peer dependency: vite ^8.0.10

When to use

Use this package when your project already uses Vite and you want sitemap and robots.txt artifacts handled during dev and build.

Public exports

export { siteIndexBuildPlugin } from "./domains/build/build.plugin.js";
export { siteIndexServePlugin } from "./domains/serve/serve.plugin.js";
export { siteIndexPlugin } from "./main.js";

Public API

Recommended default:

  • siteIndexPlugin(options): Vite.Plugin[]

Lower-level exports:

  • siteIndexBuildPlugin(options): Vite.Plugin
  • siteIndexServePlugin(options): Vite.Plugin

Options:

type Options = Pick<CoreOptions, "siteUrl" | "extensions">;

Behavior

siteIndexPlugin(options) returns:

  • siteIndexServePlugin(options)
  • siteIndexBuildPlugin(options)

Serve plugin:

  • applies in Vite dev server
  • creates runtime from the existing Vite dev server
  • builds artifacts during configureServer
  • serves generated artifact paths such as:
    • /sitemap.xml
    • /sitemap-<name>.xml
    • /robots.txt
  • returns headers only for HEAD requests
  • rebuilds on hot updates when changed files are in runtime watched files
  • logs warnings/errors via @site-index/observability

Build plugin:

  • applies during Vite build
  • creates runtime from resolved Vite config
  • builds artifacts in buildStart
  • emits generated artifacts as assets in generateBundle
  • closes runtime in closeBundle
  • logs warnings through @site-index/observability

Example

import { defineConfig } from "vite";
import { siteIndexPlugin } from "@site-index/vite-plugin";

export default defineConfig({
  plugins: [
    siteIndexPlugin({
      siteUrl: "https://example.com",
    }),
  ],
});

Keywords

site-index

FAQs

Package last updated on 15 May 2026

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