Installation
There are two ways to install the package.
1. Bundler
If you're using a bundler in your project, install swup from npm:
npm install swup
In your application, import swup and create a new instance:
import Swup from 'swup';
const swup = new Swup({
/* options */
});
2. CDN
If you're not using a bundler and want to get started quickly, you can include the minified production file from a CDN:
<script src="https://unpkg.com/swup@3"></script>
In your main script, create a new instance:
const swup = new Swup();