-
Notifications
You must be signed in to change notification settings - Fork 32
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
[Bug] cannot use some names in imports #167
Comments
Do you have a repo where I can look ? Import should be analyzed with a warning/Reallocation of the story with the same name. |
For me the issue comes with import "conflicts"
if we rename to
it works. I wasn't sure if the error came from this library, storybook, vite or esm lol |
@basselalsayed can you share a repository that demonstrates this problem? |
@JReinhold yeah here you go https://github.com/basselalsayed/svelte-storybook-csf-issue in select.svelte, try renaming the import and it works fine |
I am experiencing a similar issue with shadowing of the global
Perhaps a general pass to reduce name collisions over all the scoped variables in the template would be good, incl. underscore prefixing etc. |
Note
This issue as a possible workaround
Describe the bug
Can't use:
import { Menu } from './index';
inindex.stories.svelte
(but it works, if 'Menu' will be changed by other word: 'DropdownMenu' for example)
Steps to reproduce the behavior
npm create svelte@latest <name-of-app>
npx storybook init
Expected behavior
More details are in screenshots
Screenshots and/or logs
Environment
Additional context
Will be good to know which words are 'forbidden' too, but will be great to fix it :)
The text was updated successfully, but these errors were encountered: