-
Notifications
You must be signed in to change notification settings - Fork 3
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
Turbosnap and barrel imports #4
Comments
@ghengeveld is this something that would need to change on Chromatic's side? @ITsvetkoFF, are all of the imports of the barrel file found in the output from this plugin? There's also storybookjs/storybook#19228 which needs to also be implemented for vite, but I'm uncertain whether it would have any impact on what you are experiencing here. |
@IanVS if you mean
in our Vite config, this file is 12K lines of code... :) |
Sorry no, I mean your |
It does import 1 file but its path is aggressively ignored by using |
Sorry, I was getting this issue confused with another. But that's still good info. I'm not sure what can be done, right now, but if you're able to dig in and get some ideas of ways this can be improved, I'd be happy to discuss/review. But like I said, the whole plugin needs to be rebuilt to accommodate storybookjs/storybook#19228, but I don't have the time at the moment. |
This is an issue intended to open a discussion about how turbosnap works with the codebases that are using barrel imports.
I've noticed that if in the story some imports are from
index
files - all the files that are in these index files are considered to be changed by turbosnap. This may be similar to webpack problems described here and hereThis is especially important for us since we're trying to make the code in stories usable as is, so we have imports from
@company/ui-library
in story code which is mapped to index file.Any suggestions for a workaround for that issue?
The text was updated successfully, but these errors were encountered: