Running SSR Server does not work with Typescript
See original GitHub issueI’m evaluating this plugin to use with a Vue-CLI project created with Typescript.
Repro steps:
vue create new-project
vue add @vue/typescript
vue add @akryum/ssr
npm run ssr:serve
Result: When opening localhost:8000, I get an error from the server on initial render: TypeError: runner is not a function
.
Expected Result: Example app renders as expected.
Let me know if this is on the radar already? I’m pretty interested in this project so I would be happy to attempt to contribute a solution to this issue.
demo repo: https://github.com/hmillison/vue-ssr-plugin-reproduction.git
Issue Analytics
- State:
- Created 5 years ago
- Reactions:13
- Comments:23 (7 by maintainers)
Top Results From Across the Web
Angular 11 SSR is compiled,but having issue with prod ...
The compiled SSR code available at node dist/new-asasa/server/main.js is just application code. If you try to run it directly using Node, it ...
Read more >Fullstack TypeScript: Node.js + React SSR
In this post I'll show you how to setup a fullstack TypeScript web application project that uses Node.js and React with server-side ...
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 >Creating Server-side Rendered Vue.js Apps Using Nuxt.js
Another important thing to note is Nuxt doesn't have to be used for SSR. ... Then we just need to install dependencies and...
Read more >Advanced Features: Custom Server
server.js doesn't go through babel or webpack. Make sure the syntax and sources this file requires are compatible with the current node version...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve managed to come up with a solution. This whole Vue CLI + webpack configuration topic could be even better documented than it already is… The thing with the changes in a4ee8e4 is, that the plugin is adopting the “new”
chainWebpack
API there, which actually makes things a lot easier and at least opens up many possibilities to plugin developers in general.What’s bad is that by default the
chainWebpack
hooks from@vue/cli-plugin-typescript
run later than the ones from this plugin, given that they are both listed in the same group of dependencies inpackage.json
, whiledependencies
run afterdevDependencies
. One can change the alphabetical order by hand, which I did and my issue was immediately gone. Under circumstances the Vue’s typescript plugin overrides the critical optionentry.app
with its default value./src/main.ts
.–> responsible lines of code here.
Plugin ordering is on our radar for v4