Skip to content

Commit

Permalink
Merge pull request #20 from swup/fix/plugin-args
Browse files Browse the repository at this point in the history
  • Loading branch information
daun authored Sep 20, 2023
2 parents ca123cf + ca74b97 commit 185f83b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.3.2

- Fix plugin initilisation for a11y-plugin

## 1.3.1

- Refactor dynamic imports
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export function buildInitScript(options: Partial<Options> = {}): 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
Expand Down

0 comments on commit 185f83b

Please sign in to comment.