Skip to content

Commit 987a2c8

Browse files
authored
Merge pull request #2977 from modernweb-dev/fix/storybook-builder-with-node-22.18
fix(storybook-builder): fix Node 22.18
2 parents 40cf3c2 + 26fccca commit 987a2c8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/stale-hats-notice.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@web/storybook-builder': patch
3+
---
4+
5+
fix Node 22.18

packages/storybook-builder/src/rollup-plugin-mdx.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { compile } from '@mdx-js/mdx';
21
import type { Options } from '@storybook/types';
32
import { readFile } from 'node:fs/promises';
43
import { dirname, join, sep } from 'node:path';
@@ -54,6 +53,7 @@ export function rollupPluginMdx(options: Options): Plugin {
5453
jsxOptions,
5554
});
5655

56+
const { compile } = await import('@mdx-js/mdx'); // for CJS compatibility
5757
const mdxResult = await compile(mdxCode, mdxLoaderOptions.mdxCompileOptions);
5858

5959
return mdxResult.toString();

0 commit comments

Comments
 (0)