Skip to content

A vite plugin to import other html files into one html file

Notifications You must be signed in to change notification settings

lassejlv/vite-include-html-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vite Include Html File

This is a basic plugin that allows you to import other html files into one file. (Only works for vanilla)

Installation

npm i vite-plugin-include-html -D

Usage

vite.config.js file

import includeHtml from "vite-plugin-include-html";
import { defineConfig } from "vite";

export default defineConfig({
  plugins: [includeHtml()],
});
<include src="myfile.html"></include>

Output

<div>
  <h1>This is cool</h1>
  <p>Yoo what is going on in here this is a test</p>
</div>

About

A vite plugin to import other html files into one html file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published