Socket
Book a DemoInstallSign in
Socket

vite-plugin-html-prerender

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package version was removed
This package version has been unpublished, mostly likely due to security reasons

vite-plugin-html-prerender

Vite.js plugin for pre-rendering html for SPAs.

0.1.1
unpublished
Source
npmnpm
Version published
Weekly downloads
60
71.43%
Maintainers
1
Weekly downloads
 
Created
Source

vite-plugin-html-prerender

Vite.js plugin for pre-rendering html for SPAs.

Install

npm i -D vite-plugin-html-prerender

Usage

Add htmlPrerender to your configuration (vite.config.js/vite.config.ts):

import { defineConfig } from "vite";
import { htmlPrerender } from "vite-plugin-html-prerender";
import path from "path";

export default defineConfig({
    plugins: [
        htmlPrerender({
            /**
             * Required: Output directory of "vite build"
             */
            staticDir: path.join(__dirname, "dist"),
        
            /**
             * Required: List of routes to pre-render.
             */
            routes: ["/", "/about"],

            /**
             * Optional: To minify html. Uses https://github.com/kangax/html-minifier.
             */
            minify: {
                collapseBooleanAttributes: true,
                collapseWhitespace: true,
                decodeEntities: true,
                keepClosingSlash: true,
                sortAttributes: true
            }
        })
    ]
});

Keywords

vite

FAQs

Package last updated on 08 Jul 2023

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.