From 9625bac9bdb25c0d85c941407a45b53b3a6a7d1c Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Fri, 14 Jun 2024 00:50:25 +0800 Subject: [PATCH] Addon-a11y: Workaround for Vite 5.3.0 compat --- code/addons/a11y/src/a11yRunner.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/addons/a11y/src/a11yRunner.ts b/code/addons/a11y/src/a11yRunner.ts index 82a851b89b05..ecfe36315f43 100644 --- a/code/addons/a11y/src/a11yRunner.ts +++ b/code/addons/a11y/src/a11yRunner.ts @@ -29,7 +29,7 @@ const run = async (storyId: string, input: A11yParameters = defaultParameters) = if (!active) { active = true; channel.emit(EVENTS.RUNNING); - const axe = (await import('axe-core')).default; + const { default: axe } = await import('axe-core'); const { element = '#storybook-root', config, options = {} } = input; const htmlElement = document.querySelector(element as string);