Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Builder-vite: normalize absolute paths when processing preview annotations #19828

Closed
wants to merge 6 commits into from
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { PreviewAnnotation } from '@storybook/types';
import { resolve } from 'path';
import { normalizePath } from 'vite';

/**
* Preview annotations can take several forms, and vite needs them to be
Expand Down Expand Up @@ -29,5 +30,5 @@ export function processPreviewAnnotation(path: PreviewAnnotation | undefined) {
throw new Error('Could not determine path for previewAnnotation');
}

return path;
return normalizePath(path);
}