Running SSR Server does not work with TypescriptSee original GitHub issue
I’m evaluating this plugin to use with a Vue-CLI project created with Typescript.
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.
- Created 4 years ago
- Comments:23 (7 by maintainers)
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 in
dependencies run after
devDependencies. 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 option
entry.app with its default value