1.0.0 • Published 1 month ago

vite-plugin-unit v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

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

1.0.0

1 month ago

0.0.3

4 months ago

0.0.5

4 months ago

0.0.4

4 months ago

0.0.2

4 months ago

0.0.1

4 months ago