SSR build for vue not output server side
See original GitHub issueExpect:
- Able to run
yarn build
and deploy using build output
Actual:
- Serve dist will return a blank page
Logs
- Start project using command
npm init capri demo-capri -- -e vue
- Run
yarn build
yarn build
yarn run v1.22.19
$ vite build && vite build --ssr
vite v2.9.13 building for production...
β 40 modules transformed.
dist/assets/capri.ce1c56b3.svg 1.38 KiB
dist/preview/index.html 1.02 KiB
dist/index.html 0.65 KiB
dist/ssr-manifest.json 2.74 KiB
dist/assets/index.12a53772.js 0.23 KiB / gzip: 0.16 KiB
dist/assets/hydrate.09f2daa6.js 2.06 KiB / gzip: 0.96 KiB
dist/assets/plugin-vue_export-helper.21dcd24c.js 0.09 KiB / gzip: 0.10 KiB
dist/assets/Counter.island.d5166a1f.js 0.49 KiB / gzip: 0.34 KiB
dist/assets/Expandable.island.718a2566.js 0.81 KiB / gzip: 0.52 KiB
dist/assets/MediaQuery.island.fe4d450c.js 0.38 KiB / gzip: 0.29 KiB
dist/assets/Counter.island.9a7e7aed.css 0.05 KiB / gzip: 0.07 KiB
dist/assets/main.beb4e855.css 0.75 KiB / gzip: 0.43 KiB
dist/assets/main.e47b13dd.js 24.83 KiB / gzip: 10.35 KiB
dist/assets/Expandable.island.e8e34690.css 0.31 KiB / gzip: 0.20 KiB
dist/assets/runtime-dom.esm-bundler.19cc2f9d.js 59.27 KiB / gzip: 23.58 KiB
vite v2.9.13 building SSR bundle for production...
β 20 modules transformed.
dist/main.server.js 18.57 KiB
β¨ Done in 2.70s.
- Check output
dist
βββ assets
β βββ capri.ce1c56b3.svg
β βββ Counter.island.9a7e7aed.css
β βββ Counter.island.d5166a1f.js
β βββ Expandable.island.718a2566.js
β βββ Expandable.island.e8e34690.css
β βββ hydrate.09f2daa6.js
β βββ index.12a53772.js
β βββ main.beb4e855.css
β βββ main.e47b13dd.js
β βββ MediaQuery.island.fe4d450c.js
β βββ plugin-vue_export-helper.21dcd24c.js
β βββ runtime-dom.esm-bundler.19cc2f9d.js
βββ index.html
βββ preview
β βββ index.html
βββ ssr-manifest.json
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Server-Side Rendering (SSR)
Vue.js is a framework for building client-side applications. By default, Vue components produce and manipulate DOM in the browser as output.
Read more >How to Server Side Rendering (SSR) with Vue.js?
Vue instance is compiling on the server side with renderer function. Now, we create vue instance in express.
Read more >vuejs/vue-cli - Implement SSR mode (server side rendering)
But when using vue-server-renderer it expect one entry file. So commonChunksPlugin should be disabled. Building for production.
Read more >A Step-By-Step Guide to Server-Side Rendering with VueJS
Server -side rendering is proven for its performance, ... I will guide you through the process of server-side rendering (SSR) with VueJS.
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 >
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 Free
Top 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
Iβm currently working on proper SSR support in the next branch. The repo already contains two examples, one for Vercel and one for Cloudflare workers: https://github.com/capri-js/capri/tree/next/examples
For a simple Node server something like this should work:
Hey @fgnass, Iβve invited you to the repo. I was already using react-router-dom 6.3.0 so I donβt know what happens.
I am not stuck in anyway as I can restart from scratch but if you manage to reproduce the issues, this may help you figure out some bugs.
Itβs private only because I was testing out Plasmic and not yet sure of which API key is public or not (the one in the repo is public according to Plasmic team), so feel free to reuse this code if you want to create a Plasmic starter.