More Premium Hugo Themes Premium Html Themes

Vite Plugin Document

use Document.tsx as html template

Vite Plugin Document

use Document.tsx as html template

Author Avatar Theme by jiangweixian
Github Stars Github Stars: 9
Last Commit Last Commit: Jun 18, 2023 -
First Commit Created: Jun 19, 2023 -
Vite Plugin Document screenshot

Overview

The “vite-plugin-document” npm package is a plugin that allows you to use a Document.tsx file as an HTML template. It provides options for customizing the filepath and bundling the Document.tsx file into the disk. It is built with solidjs framework and can automatically detect solidjs if the “vite-plugin-solid” is found in the vite plugins list.

Features

  • Allows you to use a Document.tsx file as an HTML template
  • Provides options to customize the filepath and output directory
  • Built with the solidjs framework
  • Automatically detects solidjs if “vite-plugin-solid” is present in vite plugins list

Installation

To install the vite-plugin-document package, follow these steps:

  1. Create a “src/Document.tsx” file.
  2. Add the following code to the “Document.tsx” file:
// code snippet here
  1. Check the playground for more details.
  2. Install the package using the following command:
pnpm i vite-plugin-document

Summary

The vite-plugin-document npm package is a useful plugin for Vite projects that allows you to use a Document.tsx file as an HTML template. It offers customization options for the filepath and output directory and is built with the solidjs framework. With the ability to automatically detect solidjs if vite-plugin-solid is present, this plugin streamlines the process of creating HTML templates for your Vite projects.