Package Exports
- laravel-mix-ziggy-watch
- laravel-mix-ziggy-watch/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (laravel-mix-ziggy-watch) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Laravel Mix Ziggy Watch
Laravel Mix extension which adds support for building your Ziggy routes file during mixing as well as automatic rebuilding when in --watch mode.
Installation
npm i laravel-mix-ziggy-watchor
yarn add laravel-mix-ziggy-watchUsage
const mix = require("laravel-mix");
require("laravel-mix-ziggy-watch");
mix.js("resources/js/app.js", "public/js").ziggyWatch({});
Configuration
You can pass config options to the ziggyWatch method in your mix file.
| name | type | required | description | default |
|---|---|---|---|---|
| watch | string/array/boolean | no | Paths to files, dirs to be watched recursively, or glob patterns. false to disable watch |
["routes/**/*.php"] |
| output | string | no | The output path of your generated routes file, relative to root dir | "resources/js/ziggy.js" |
| production | boolean | no | Enable build/watch in production mode | true |
| development | boolean | no | Enable build/watch in development mode | true |