A swup plugin for debugging and helping in development
npm install @swup/debug-pluginA swup plugin for debugging and helping in development.
- Detect common mistakes and suggest solutions in the console
- Output all triggered hooks to the console as they happen
- Configure swup's log method to make its output visible
Install the plugin from npm and import it into your bundle.
``bash`
npm install @swup/debug-plugin
`js`
import SwupDebugPlugin from '@swup/debug-plugin';
Or include the minified production file from a CDN:
`html`
To run this plugin, include an instance in the swup options.
`javascript`
const swup = new Swup({
plugins: [new SwupDebugPlugin()]
});
If true, the plugin will store the swup instance on the global window object, making swupwindow.swup
available at . Defaults to false.
`javascript``
{
globalInstance: true
}