Skip to content

tighten/jigsaw-vite-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jigsaw Vite Plugin

MIT License

@tighten/jigsaw-vite-plugin is a Vite plugin for the Jigsaw static site generator. It watches your Jigsaw site's files and triggers a new build when it detects changes.

You'll want to ensure you are in Jigsaw version 1.8.0 or later before installing this plugin.

Installation

npm install -D @tighten/jigsaw-vite-plugin

Usage

Make sure the head of your layouts/main.blade.php file:

@viteRefresh()
<link rel="stylesheet" href="{{ vite('source/_assets/css/main.css') }}">
<script defer type="module" src="{{ vite('source/_assets/js/main.js') }}"></script>

Add the plugin to your vite.config.js file:

import { defineConfig } from 'vite';
import jigsaw from '@tighten/jigsaw-vite-plugin';

export default defineConfig({
    plugins: [
        jigsaw({
            input: ['source/_assets/js/main.js', 'source/_assets/css/main.css'],
            refresh: true,
        }),
    ],
});

Credits

Huge thanks to the vite-plugin-full-reload and laravel-vite-plugin

License

Jigsaw Vite Plugin is provided under the MIT License.

About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •