New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

vite-plugin-unit

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-unit

A vite plugin to enable you build websites in units.

latest
Source
npmnpm
Version
2.0.1
Version published
Maintainers
1
Created
Source

vite-plugin-unit

npm

A vite plugin to enable you build websites in units using alpine.js

Check out the create-unit library for details.

installation

npm i -D vite-plugin-unit

usage

import unit from "vite-plugin-unit";
import { defineConfig } from "vite";

export default defineConfig({
    plugins: [
        unit({/* options */})
    ]
});

configuration

type PluginOptions = {
    pages: string;
    template: string;
    slot: string;
};
  • options.template: string - The HTML file in which compiles .unit files will be mounted
  • options.pages: string - The folder under src folder containing the pages or routes
  • options.slot: string - The slot identifier in the template to be replaced by compiled .unit files

default options

const defaultOptions = {
    pages: "pages/",
    template: "template.html",
    slot: "#slot#"
};

License

Released under the MIT License

Copyright © 2024-present, Henry Hale

Keywords

vite

FAQs

Package last updated on 05 Apr 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