Skip to content
Discussion options

You must be logged in to vote

Here is an example for you on how to load swup locally without requiring a build step:

https://swup-with-local-umd.glitch.me/

The Swup.umd.js build is basically the same as any old JS library. It contains all necessary dependencies and can be loaded via a simple script tag:

<script src="Swup.umd.js"></script>
<script type="module" src="main.js"></script>

Inside main.js:

/** 
 * Swup is available on the window
 */
const swup = new window.Swup();

If you don't need your main script to be a module, you can even access Swup directly, without window.Swup:

<script src="Swup.umd.js"></script>
<script src="main.js"></script>
/** 
 * Swup is available globally
 */
const swup = new Swup();

Replies: 9 comments 13 replies

Comment options

You must be logged in to vote
6 replies
@daun
Comment options

daun May 22, 2025
Maintainer

@hirasso
Comment options

@wwwbarnamehadotnet
Comment options

@daun
Comment options

daun May 23, 2025
Maintainer

@hirasso
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by daun
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@wwwbarnamehadotnet
Comment options

Comment options

You must be logged in to vote
1 reply
@hirasso
Comment options

Comment options

You must be logged in to vote
4 replies
@daun
Comment options

daun May 29, 2025
Maintainer

@wwwbarnamehadotnet
Comment options

@daun
Comment options

daun May 29, 2025
Maintainer

@daun
Comment options

daun May 29, 2025
Maintainer

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@daun
Comment options

daun May 29, 2025
Maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #998 on May 22, 2025 05:18.