Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/plugin/src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import { StorybookConfig } from './types';
const require = createRequire(import.meta.url);
const getAbsolutePath = <I extends string>(input: I): I => dirname(require.resolve(join(input, 'package.json'))) as any;

const __dirname = dirname(fileURLToPath(import.meta.url));
const _dirname = dirname(fileURLToPath(import.meta.url));

const renderer = join(__dirname, 'entry-preview.js');
const renderer = join(_dirname, 'entry-preview.js');

export const core: StorybookConfig['core'] = {
builder: getAbsolutePath('@storybook/builder-vite'),
Expand Down Expand Up @@ -52,5 +52,5 @@ export const previewAnnotations: StorybookConfig['previewAnnotations'] = async (
return result
.concat(input)
.concat([renderer])
.concat(docsEnabled ? [join(__dirname, 'entry-preview-docs.js')] : []);
.concat(docsEnabled ? [join(_dirname, 'entry-preview-docs.js')] : []);
};