question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Question] Does SSR with Vue really need a build? (i.e. Handle component files like Ts-Node)

See original GitHub issue

Since SSR is essentially just rendering a “snapshot” of the initial state of the HTML generated by components, shouldn’t it be possible to handle component files in a similar way to how ts-node deals with .ts files?

Essentially we could use require.extensions to convert .vue files to es modules, add a .ts extension and then handle them with ts-node… giving us the ability to use Vue components without the hassle of a build.

I know, for some reason, Node says not to use this but it’s a critically useful feature when implemented carefully (as with ts-node)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
frandioxcommented, Nov 26, 2020

@arpowers Very interesting idea. It could be useful at least for development in order to have a local SSR environment that doesn’t require build watching, like what you mentioned in another issue.

In production, however, I think a build would still be better at least for short-lived environments such as serverless functions or workers. Maybe it could be fine for Node servers 🤔

0reactions
yyx990803commented, Jan 8, 2021

Closing for #1290

Read more comments on GitHub >

github_iconTop Results From Across the Web

Server-Side Rendering (SSR) - Vue.js
Vue.js is a framework for building client-side applications. ... using SSR for your app, the first question you should ask is whether you...
Read more >
Vue 3 Server Side Rendering (SSR)
A guide to building and running a server-side rendered Vue 3 application in a Node environment with routing, state, and meta.
Read more >
Vue SSR without node - Stack Overflow
Is it possible for me to build my components (using webpack etc), upload them to the server - and have them pre-populated server...
Read more >
Basic Server Side Rendering with Vue.js and Express
Learn how to implement rudimentary server-side for your Vue.js apps. ... Server side rendering (SSR) is one of those things that's long been ......
Read more >
Fullstack TypeScript: Node.js + React SSR | Nils Mehlhorn
Our source code will consist out of TypeScript files which we'll compile ... You'll also want to install type definitions for Node.js and ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found