From 2f8c8331cde598094d806922f7b0ea63eabdc64f Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Fri, 14 Jun 2024 00:54:15 +0800 Subject: [PATCH] Merge pull request #28241 from storybookjs/shilman/fix-a11y-vite-5-3-0 Addon-a11y: Workaround for Vite 5.3.0 compat (cherry picked from commit 01be0f0d19ba7925607453dad0449ebed49794a0) --- 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 ec33803558c3..0a2c87bb2b1f 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);