Skip to content

Commit 37f2ba7

Browse files
authored
bug: on Windows path with back slash removed after formatting with prettier (storybookjs#546)
1 parent 526fc04 commit 37f2ba7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/react-native/scripts/generate.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,13 @@ function generate({ configPath, absolute = false, useJs = false }) {
2929
workingDir: cwd,
3030
});
3131

32-
// TODO refactor contexts and normalized stories to be one thing
3332
const normalizedStories = storiesSpecifiers.map((specifier) => {
3433
// TODO why????
3534
const reg = globToRegexp(`./${specifier.files}`);
3635

3736
const { path: p, recursive: r, match: m } = toRequireContext(specifier);
3837

39-
const pathToStory = ensureRelativePathHasDot(path.relative(configPath, p));
38+
const pathToStory = ensureRelativePathHasDot(path.posix.relative(configPath, p));
4039
return `{
4140
titlePrefix: "${specifier.titlePrefix}",
4241
directory: "${specifier.directory}",

0 commit comments

Comments
 (0)