-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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(config): resolve externalized specifier with internal resolver #10683
fix(config): resolve externalized specifier with internal resolver #10683
Conversation
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.
Thanks for fixing these again 😅
Part of me wanted to skip resolving if the file we're bundling is under the same package.json, so we soften the blow with these changes, but hopefully this would do the trick.
@sapphi-red Friendly suggestion: Some review comments on your changes would help me understand your PRs better when I'm rebasing my fork in the future 😇 |
* @deprecated In future, `conditions` will work like this. | ||
* @internal | ||
*/ | ||
overrideConditions?: string[] |
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.
What does this do? Hard to know from just reading the code.
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.
Ok I think I get it.
This option decides which of the default conditions (production
, development
, module
) are allowed. It may also add custom conditions, and it prevents the conditions
option from being used.
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.
Yes, that's correct.
if (options.overrideConditions) { | ||
conditions.push( | ||
...options.overrideConditions.filter((condition) => | ||
conditionalConditions.has(condition) |
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.
This looks like a typo.
The has
check should be negated, yes?
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.
Good catch! Thanks. I'll fix it with some refactor around this.
Bug introduced in vitejs#10683 Some packages use "require" instead of "default" for CJS entry
Description
This PR reverts #10528 and implementes the first suggestion of #10495.
import-meta-resolve
didn't work with yarn (#10652) and this PR fixes that.This PR also fixes #10649. (But I don't consider this as a regression. That import should be imported with extension
tailwindcss/plugin.js
)fixes #10649
fixes #10652
refs #10254 #10495 #10528
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).