Skip to content

Commit 6d315a0

Browse files
committed
Remove ESM require from Storybook main.ts
1 parent a044b2d commit 6d315a0

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

apps/storybook/.storybook/main.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
import type { StorybookConfig } from '@storybook/nextjs';
22

3-
import { dirname, join } from 'path';
4-
5-
/**
6-
* This function is used to resolve the absolute path of a package.
7-
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
8-
*/
9-
function getAbsolutePath(value: string): any {
10-
return dirname(require.resolve(join(value, 'package.json')));
11-
}
123
const config: StorybookConfig = {
134
stories: [
145
'../src/stories/**/*.mdx',
@@ -17,7 +8,7 @@ const config: StorybookConfig = {
178
],
189
addons: ['@storybook/addon-themes', '@storybook/addon-docs', '@storybook/addon-a11y', '@storybook/addon-designs'],
1910
framework: {
20-
name: getAbsolutePath('@storybook/nextjs'),
11+
name: '@storybook/nextjs',
2112
options: {},
2213
},
2314
core: {

0 commit comments

Comments
 (0)