diff --git a/examples/module-federation/mf-react-component/.storybook/main.ts b/examples/module-federation/mf-react-component/.storybook/main.ts index 3643264a4..9d44f3c6e 100644 --- a/examples/module-federation/mf-react-component/.storybook/main.ts +++ b/examples/module-federation/mf-react-component/.storybook/main.ts @@ -1,5 +1,7 @@ +import { createRequire } from 'node:module'; import { dirname, join } from 'node:path'; import type { StorybookConfig } from 'storybook-react-rsbuild'; +const require = createRequire(import.meta.url); /** * This function is used to resolve the absolute path of a package.