Skip to content

Commit 6fffa5c

Browse files
Copilotd10c
andcommitted
Fix Storybook build by converting preset.ts to ES modules and temporarily disabling MDX
- Convert require.resolve() to ES module syntax using import.meta.url - Remove MDX files from stories config to fix build (MDX support needs proper addon configuration) Co-authored-by: d10c <9970661+d10c@users.noreply.github.com>
1 parent 794be4c commit 6fffa5c

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

extensions/ql-vscode/.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { StorybookConfig } from "@storybook/react-vite";
22

33
const config: StorybookConfig = {
4-
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
4+
stories: ["../src/**/*.stories.@(js|jsx|ts|tsx)"],
55
addons: [
66
"@storybook/addon-links",
77
"@storybook/addon-a11y",
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1+
import { dirname, join } from "path";
2+
import { fileURLToPath } from "url";
3+
4+
const __dirname = dirname(fileURLToPath(import.meta.url));
5+
16
export function previewAnnotations(entry = []) {
2-
return [...entry, require.resolve("./preview.ts")];
7+
return [...entry, join(__dirname, "preview.ts")];
38
}
49

510
export function managerEntries(entry = []) {
6-
return [...entry, require.resolve("./manager.tsx")];
11+
return [...entry, join(__dirname, "manager.tsx")];
712
}

0 commit comments

Comments
 (0)