Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Feat: support tailwind config files #2831
Feat: support tailwind config files #2831
Changes from 7 commits
7bc5e98
62eefa7
1db14d3
1feb1da
f2fd7ed
6fd93a2
2c7e80f
434f89a
97162bc
1152dea
9fb4662
a83e355
19f29cb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
something I'll keep in mind: setting default variables options seems to be a common use-case for integrations. Nuxt ships with a helper for integrations to define default options easily, maybe could do the same in the future.
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.
If
userConfig?.value
returned something but that something wasn't an object, I almost would want this to be an error that the user sees, instead of silently failing this check and using the default config below.Can we do the simpler
if (userConfig && userConfig.value) {
here?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.
Actually, taking a step further back: what happens if
options.path
is given to the integration, but then fails to load? I'd expect that to be an error for the user to investigate & fix.Another good reason to do this is that it should really let you simplify the code below where you're trying to handle this tricky case. For example, I think it would mean that you could just do this, below:
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.
Ah, great thinking! One issue with this refactor though: it'll throw an error when a
tailwind.config
is missing no matter what. Ideally, it would log a human-readable error specifically when you pass a badconfig.path
. Made a refactor here.Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.