You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting to use the plugin with Storybook 6.5.9 on Windows and it fails silently by not showing any tokens in the panel or via the doc blocks.
On debugging, it's clear that the glob.sync is returning an empty array in plugin.js getTokenFilePaths().
The path is joined onto the context which, on windows, has back slashes: C:\repos\design-tokens and ends up as C:\repos\design-tokens\**\*.css before being passed to glob.sync, which only supports POSIX paths.
If I replace backslashes slashes after joining the strings with path.join(), it works fine.
Attempting to use the plugin with Storybook 6.5.9 on Windows and it fails silently by not showing any tokens in the panel or via the doc blocks.
On debugging, it's clear that the
glob.sync
is returning an empty array in plugin.jsgetTokenFilePaths()
.The path is joined onto the context which, on windows, has back slashes:
C:\repos\design-tokens
and ends up asC:\repos\design-tokens\**\*.css
before being passed to glob.sync, which only supports POSIX paths.If I replace backslashes slashes after joining the strings with path.join(), it works fine.
const paths = glob.sync(path.replace(/\\/g, '/'));
It works fine for me using the webpack5 demo from this repo (earlier version of storybook).
From a quick google, it looks like the node-glob package has always worked like this so I'm not sure why it's breaking now.
The text was updated successfully, but these errors were encountered: