Skip to content
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(compiler-sfc): supports reference a variable in withDefaults #6459

Closed
wants to merge 2 commits into from
Closed

feat(compiler-sfc): supports reference a variable in withDefaults #6459

wants to merge 2 commits into from

Conversation

sxzz
Copy link
Member

@sxzz sxzz commented Aug 12, 2022

  • Support
import defaults from './some'
withDefaults(defineProps<{ foo: string }>(), defaults)

Existing plugin: https://github.com/Zolyn/vite-plugin-vue-with-defaults-imports
Inspired by @Zolyn

@netlify
Copy link

netlify bot commented Nov 9, 2022

Deploy Preview for vuejs-coverage failed.

Name Link
🔨 Latest commit adfb68a
🔍 Latest deploy log https://app.netlify.com/sites/vuejs-coverage/deploys/63d2b3833ee45800095e44ff

@yyx990803
Copy link
Member

yyx990803 commented Mar 28, 2023

We are deprecating withDefaults() in favor of reactive props destructure, so let's avoid complicating the codebase for it.

@yyx990803 yyx990803 closed this Mar 28, 2023
@sxzz sxzz deleted the feat/with-defaults-ref branch March 28, 2023 03:22
@yyx990803
Copy link
Member

Landed in fe61944

IAmSSH pushed a commit to IAmSSH/core that referenced this pull request May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants