diff --git a/CHANGELOG.md b/CHANGELOG.md index 226295f..7c115c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.3.2 + +- Fix plugin initilisation for a11y-plugin + ## 1.3.1 - Refactor dynamic imports diff --git a/package-lock.json b/package-lock.json index d48de6b..e35d5c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@swup/astro", - "version": "1.3.1", + "version": "1.3.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@swup/astro", - "version": "1.3.1", + "version": "1.3.2", "license": "MIT", "dependencies": { "@swup/a11y-plugin": "^4.0.0", diff --git a/package.json b/package.json index c57c188..64491e7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@swup/astro", "description": "Smooth page transitions, smart preloading and more in Astro", - "version": "1.3.1", + "version": "1.3.2", "type": "module", "types": "./dist/index.d.ts", "main": "./dist/index.js", diff --git a/src/script.ts b/src/script.ts index 6db32de..8bdd4ac 100644 --- a/src/script.ts +++ b/src/script.ts @@ -90,7 +90,7 @@ export function buildInitScript(options: Partial = {}): string { }; // Only enable plugins that are requested - const enabledPlugins = Object.fromEntries(Object.entries(plugins).filter(([, enabled]) => enabled)); + const enabledPlugins = Object.fromEntries(Object.entries(plugins).filter(([, enabled]) => enabled).map(([plugin, options]) => [plugin, options === true ? {} : options])); // Create import statements for swup and enabled plugins // This gets injected into the user's page, so we need to re-export Swup and all plugins