-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
fix: Handle ESM Tailwindconfigs (fix #667) #723
fix: Handle ESM Tailwindconfigs (fix #667) #723
Conversation
Run & review this pull request in StackBlitz Codeflow. |
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
✅ Deploy Preview for histoire-examples-svelte3 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for histoire-examples-vue3 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for histoire-controls ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for histoire-site ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
The patch didn't work for me as the tailwind plugins (i.e. backgroundColours, etc.) that the tailwind storyTemplate expects were not being generated. After reading the documentation, I noticed that resolveConfig needed to run on with the tailwind config at the base of the imported object, not just the storyTemplate function.
Co-authored-by: Bahul Neel Upadhyaya <[email protected]>
Co-authored-by: Bahul Neel Upadhyaya <[email protected]>
Thank you for the feedback @bahulneel - i didn't run into that problem but i guess it depends on the ts environment you're in. As your suggestions were optional chained i've pulled them in the PR. |
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.
IMO that looks correct ... well done.
Anything blocking from merging this? |
@schwarmco not intending to annoy anyone but ... any blockers on this? Or this be merged? |
not annoying at all @waldemarennsaed - i'd love to get this merged too but i'm not a maintainer of histoire. i am actively using that patch on my projects |
@Akryum I don't know who else I could mention here - can you maybe bring some life to this MR? 🤓 |
I am also facing this problem🥹👆🏻 And I think this MR will help:
|
Description
Fixes #667
When using ESMs
export default
instead ofmodule.exports
intailwind.config.{js,ts}
the tailwindConfig is nested in adefault
key which then incorrectly merges with tailwinds default config like this:What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).