What's new in Vue 3 that I care about
By now Vue 3 isn't new any more at v3.3. I've also been absent (taking longer?) writing front-end code, and play catch-up more often than I like. Here are some of the salient differences I learnt/remembered bringing back the site up again:
script setup
does a LOT
I thought it was just some initiailization syntatic sugar for the component. Turns out it does so much it reduces a lot of the old Vue scripting for simple components. Things like how variables declared automatically become accessible in thetemplate
section.- Composables replacing mixins
Still learning the ropes, but it's looking cozy for me adopting this new way of reusing libraries. I should learn more about the differences.
What I learnt about Nuxt
The latest Nuxt (v3.6) is pretty good. I like the Vite engine; how it seems to start up faster. It's not perfect though:
- Debugging Static Site Generation (SSG)
When the compile breaks, the stock compiler (npm run generate
) just shows Error 500. Easy enough to debug: just put try-catch blocks where you think the problem is. Still, it's a bother. - Built-in Markdown compile Prose looks buggy
Even though I put <> tags inside a code block e.g.<script>
Nuxt/Prose will want to parse/execute it as an embedded HTML element.