mirror of
https://github.com/cupcakearmy/liquet.git
synced 2025-09-06 07:50:41 +00:00
preloading
This commit is contained in:
11
src/js/swup.js
Normal file
11
src/js/swup.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import Swup from 'swup'
|
||||
import SwupPreloadPlugin from '@swup/preload-plugin';
|
||||
|
||||
export default (fn) => {
|
||||
const swup = new Swup({
|
||||
plugins: [new SwupPreloadPlugin()],
|
||||
containers: ['#app']
|
||||
})
|
||||
|
||||
swup.on('contentReplaced', fn)
|
||||
}
|
Reference in New Issue
Block a user