Skip to content

Commit 61e8d3e

Browse files
authored
fix(examples): correct use require in ESM (#919)
1 parent 59fdc63 commit 61e8d3e

File tree

1 file changed

+2
-0
lines changed
  • examples/module-federation/mf-react-component/.storybook

1 file changed

+2
-0
lines changed

examples/module-federation/mf-react-component/.storybook/main.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
import { createRequire } from 'node:module';
12
import { dirname, join } from 'node:path';
23
import type { StorybookConfig } from 'storybook-react-rsbuild';
4+
const require = createRequire(import.meta.url);
35

46
/**
57
* This function is used to resolve the absolute path of a package.

0 commit comments

Comments
 (0)