
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
vite-plugin-watch
Advanced tools
A Vite plugin that runs custom shell commands on file changes.
You can install the package via npm
or yarn
:
npm i -D vite-plugin-watch
# or
yarn add -D vite-plugin-watch
Import the package from vite.config.js
and configure it.
import { defineConfig } from "vite"
import { watch } from "vite-plugin-watch"
export default defineConfig({
plugins: [
watch({
pattern: "app/{Data,Enums}/**/*.php",
command: "php artisan typescript:transform",
}),
],
})
Once a tracked file changes, the plugin will execute a specified command.
The paths of tracked files are configured as glob patterns:
name | type | description | default |
---|---|---|---|
pattern | string|string[] | Tracked files paths | |
command | string|string[] | One or multiple command(s) to be executed on file change | |
timeout | number | Timeout between triggering the same command | 500 |
silent | boolean | Hide the output in the console | false |
onInit | boolean | Run the command on Vite start | true |
Take your Inertia.js skills to the next level with my book Advanced Inertia. Learn advanced concepts and make apps with Laravel and Inertia.js a breeze to build and maintain.
Momentum is a set of packages designed to improve your experience building Inertia-powered apps.
The MIT License (MIT). Please see License File for more information.
FAQs
Vite plugin to run custom commands on file changes
The npm package vite-plugin-watch receives a total of 8,098 weekly downloads. As such, vite-plugin-watch popularity was classified as popular.
We found that vite-plugin-watch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.