Skip to content

fixing the warning message #19

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

Merged
merged 1 commit into from
Feb 24, 2025
Merged

fixing the warning message #19

merged 1 commit into from
Feb 24, 2025

Conversation

tnylea
Copy link
Contributor

@tnylea tnylea commented Feb 24, 2025

When running npm run build or npm run dev, we are getting this warning:

npm run build                                                                                   ✔  01:04:13 PM 

> build
> vite build

vite v6.1.1 building for production...
transforming (1460) node_modules/lucide-vue-next/dist/esm/icons/sunset.js[@vue/compiler-sfc] withDefaults() is unnecessary when using destructure with defineProps().
Reactive destructure will be disabled when using withDefaults().
Prefer using destructure default values, e.g. const { foo = 1 } = defineProps(...).

/Users/tony/Herd/vue-starter-kit/resources/js/components/AppearanceTabs.vue
7  |  }
8  |
9  |  const { class: containerClass } = withDefaults(defineProps<Props>(), {
   |                                    ^^^^^^^^^^^^
10 |      class: '',
11 |  });

This PR will fix that warning by removing the unnecessary withDefaults().

Copy link
Contributor

@oketafred oketafred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch @tnylea

@taylorotwell taylorotwell merged commit 5172942 into main Feb 24, 2025
2 checks passed
@taylorotwell taylorotwell deleted the warningFix branch February 24, 2025 18:40
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