-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add support for contextDependencies #242
Add support for contextDependencies #242
Conversation
Nice! I‘d even set default value for that based on Common directory for all components (after glob expansion). |
How would you recommend getting an absolute path from a glob? |
Check the library I’ve linked in the comment. So for |
We use common-dir to find the directory that parents all components.
@@ -1,5 +1,7 @@ | |||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | |||
# yarn lockfile v1 | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ There are so many changes in this file because I added common-dir and yarn'd with 0.17.4. I'm guessing this was originally generated with 0.16.*. I don't know what they changed in yarn, but it made significant changes in my project's yarn.lock as well when we upgraded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don’t worry, it’s better than shrinkwrap anyway ;-)
Ah, I didn't see that link the first time I read the comment. There really is a package for everything 😄 Thanks for finding that. I updated the pull. I combined all section components + top level components to find the common dir. Let me know if there's anything you'd like me to change. |
Looks very good now! Merged ;-) |
## New feature Now style guide should hot reload when you add new components. New config option , by default will watch common root folder for all your components. (#242 by @aaronjensen) ## Bug fixes and other improvements * Don’t show sidebar if there are no components found (#247 by @n1313) * Add mobile styles to improve display on narrow screens (#244 by @n1313) * Add extra HTML markup to make previews easier to find with CSS selectors (#238, #243 by @n1313)
For some reason (most probably after transition to a GitHub organization) Travis CI stopped to check pull requests.
## New feature Now style guide should hot reload when you add new components. New config option , by default will watch common root folder for all your components. (#242 by @aaronjensen) ## Bug fixes and other improvements * Don’t show sidebar if there are no components found (#247 by @n1313) * Add mobile styles to improve display on narrow screens (#244 by @n1313) * Add extra HTML markup to make previews easier to find with CSS selectors (#238, #243 by @n1313)
New config option contextDependencies, by default will watch common root folder for all your components. Original PR #242 by @aaronjensen
After much digging I happened across another solution to the hot reloading issue. This one seems to work pretty well (it still doesn't support HardSourceWebpackPlugin, but I'd say that's their bug).
This is similar to what sass-loader added: webpack-contrib/sass-loader#6