Debug plugin adds some useful functionality to the swup for development purposes. Mainly, it outputs all the events in a console as they happen, which can be useful for debugging.
Plugin also rewrites swups log
method, so any output provided by plugins is also visible.
Plugin also tries to detect some common mistakes, and outputs a suggestions into a console.
This plugin can be installed with npm
npm install @swup/debug-plugin
and included with import
import SwupDebugPlugin from '@swup/debug-plugin';
or included from the dist folder
<script src="./dist/SwupDebugPlugin.js"></script>
To run this plugin, include an instance in the swup options.
const swup = new Swup({
plugins: [new SwupDebugPlugin()]
});