Transition Inertia Vue stubs to <script setup>
syntax
#127
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.
This PR transitions the Inertia Vue 3 stubs to use Vue's
<script setup>
syntax.The official Vue docs recommend using the
<script setup>
syntax when using the Composition API with Single File Components as it reduces boilerplate and increases performance. It also significantly improves working with TypeScript, for users who may wish to convert their Breeze installation.The PR also moves the
<script setup>
section to the top of the single file components to be consistent with the Vue docs and Evan's recommendations.Note that the semicolons in the current code were applied inconsistently so I have also added them where appropriate. The Vue docs don't use semicolons, however the StyleCI JS and Vue rules require them by default.
I have tested this PR in a new Laravel Breeze installation by viewing every page component and following every action (register, login, verify email, forgot password, password reset, logout) happy and sad path. I would love for someone else to also double check this.