-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: add alias option #1634
feat: add alias option #1634
Conversation
✅ Deploy Preview for vitest-dev ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
I am not so sure. I understand it could be easier for users to have env-specific alias, yet it might still be limited. I am concerned this would introduce some slippery slope effect that we might need to re-expose every vite option under |
I think we should add Anything else should stay on Vite config. What do you think, @patak-dev? |
OK, I am ok to have |
|
||
- **Type:** `Record<string, string> | Array<{ find: string | RegExp, replacement: string, customResolver?: ResolverFunction | ResolverObject }>` | ||
|
||
Define custom aliases when running inside tests. They will be merged with aliases from `resolve.alias`. |
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.
Could it be named something else than alias
?
Genuinely asking cause it's not immediately clear to me how they compare/plug into the vite ones (alias
in vite 2 and resolve.alias
in vite 3). Easy to be confused when quickly checking config or looking for an existing issue.
Could it be renamed ? (ie: extraAlias, moduleMapper, testAlias...)
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.
It’s on test.alias, what is confusing 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.
You're absolutely right, no confusion. My bad, I was confused :)
Linked #1628