Vue template #944

Closed
opened 2025-08-09 17:18:16 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @SteveSandersonMS on 3/10/2017

As per all the requests in #524, here's a PR that adds a Vue.js template. This takes inspiration in various ways from @MarkPieszak's aspnetcore-Vue-starter, but also has some differences:

  • This one uses TypeScript for consistency with all the other templates. It also uses av-ts to coerce Vue's APIs into a more class-like shape.
  • This one does not use Vuex, just to keep things simple and approachable. Experienced Vue devs can of course add Vuex or anything similar if they want.

I'm putting this here as a PR in case anyone who is particularly familiar with Vue has comments on the approach or can suggest improvements.

Why there's no server-side prerendering

I did set it up with server-side prerendering. If you want that, look at commit 2067ea2758. But then when trying to add a reference to node-fetch (so that API calls can occur on the server too), I realised there were some severe limitations, so I removed server-side prerendering support. See #754 for details of these issues - when people ask for server-side Vue rendering, we can point them to that issue. Hopefully, someone more involved in the Vue project might be able to suggest solutions or to fix the underlying limitations in Vue's approach to SSR.

*Originally created by @SteveSandersonMS on 3/10/2017* As per all the requests in #524, here's a PR that adds a Vue.js template. This takes inspiration in various ways from @MarkPieszak's [aspnetcore-Vue-starter](https://github.com/MarkPieszak/aspnetcore-Vue-starter), but also has some differences: * This one uses TypeScript for consistency with all the other templates. It also uses [av-ts](https://github.com/HerringtonDarkholme/av-ts) to coerce Vue's APIs into a more class-like shape. * This one does not use Vuex, just to keep things simple and approachable. Experienced Vue devs can of course add Vuex or anything similar if they want. I'm putting this here as a PR in case anyone who is particularly familiar with Vue has comments on the approach or can suggest improvements. **Why there's no server-side prerendering** I did set it up with server-side prerendering. If you want that, look at commit 2067ea275812fee0a36e38c601be1c1fdebf704e. But then when trying to add a reference to `node-fetch` (so that API calls can occur on the server too), I realised there were some severe limitations, so I removed server-side prerendering support. See #754 for details of these issues - when people ask for server-side Vue rendering, we can point them to that issue. Hopefully, someone more involved in the Vue project might be able to suggest solutions or to fix the underlying limitations in Vue's approach to SSR.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#944
No description provided.