
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
vite-plugin-ssinc
Advanced tools
Vite Plugin Ssinc is a plugin for Vite that allows for Server Side Includes like syntax (with only #include
supported) to be used in HTML files.
You can install the plugin using npm:
npm install vite-plugin-ssinc
or yarn:
yarn add vite-plugin-ssinc
To use Vite Plugin Ssinc, add the following to your Vite configuration file.
// vite.config.js
import vitePluginSsinc from 'vite-plugin-ssinc';
export default {
plugins: [
vitePluginSsinc({
includeExtensions: ['shtml', 'html'],
}),
],
};
If you want to write it in CommonJS syntax, you can do it like this:
// vite.config.js
const vitePluginSsinc = require('vite-plugin-ssinc').default;
export default {
plugins: [
vitePluginSsinc({
includeExtensions: ['shtml', 'html'],
}),
],
};
In your HTML files, you can use SSI directives like so:
<!DOCTYPE html>
<html>
<head>
<title>Vite Plugin Ssinc</title>
</head>
<body>
<!--# include file="header.shtml" -->
<h1>Welcome to Vite Plugin Ssinc</h1>
<!--# include virtual="/footer.shtml" -->
</body>
</html>
When Vite serves your site, the SSI directives will be processed and the included files will be included in the HTML response.
Option | Type | Default | Required | Description |
---|---|---|---|---|
includeExtensions | Array<string> | ['shtml'] | No | An array of file extensions that should be checked for SSI directives. |
apply | 'serve' | 'build' | None | No | The mode in which the plugin should be applied. By default, the plugin will be applied in both development and production builds. |
Vite Plugin Ssinc is licensed under the MIT License.
FAQs
The plugin for including SSI-like includes in Vite.
The npm package vite-plugin-ssinc receives a total of 7 weekly downloads. As such, vite-plugin-ssinc popularity was classified as not popular.
We found that vite-plugin-ssinc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.