Server-Side Rendering with PHP V8Js (without node.js)
See original GitHub issueFeature description
PHP V8Js allows to execute JS server side. It is some sort of alternative to node.js.
Currently it is not possible to execute Vue.js this way. It complains that “setTimeout” & “document” are not defined.
As Vue.js is running fine server side with node.js it should be possible to run it with PHP V8Js.
Code sample
`<?php
$vueSource = file_get_contents(‘https://cdnjs.cloudflare.com/ajax/libs/vue/2.0.3/vue.js’); $v8 = new V8Js(); $result = $v8->executeString($vueSource); ?>`
Result
V8Js::executeString():5628: ReferenceError: document is not defined"
Issue Analytics
- State:
- Created 7 years ago
- Reactions:10
- Comments:17 (3 by maintainers)
Top Results From Across the Web
Server side rendering JavaScript from PHP \ Seb De Deyne
Server side rendering is a hot topic when it comes to client side ... The first option that comes to mind to run...
Read more >Server-Side Rendering with PHP V8Js (without node.js)
PHP V8Js allows to execute JS server side. It is some sort of alternative to node.js. Currently it is not possible to execute...
Read more >How I created the server-side rendering for my website.
Today I'm going to tell you about my solution to get your JavaScript apps (and not even JavaScript!) prerendered. That's my first post...
Read more >React.js server side rendering with PHP - Stack Overflow
To make it search engine friendly, I need it to be rendered initially on the server (serverside-rendering). The only way to do this,...
Read more >Isomorphic React.js with PHP server-side rendering
js apps wanting to do server-side rendering, but without using Node.js or Express.js. What you'll want to do is: 1. Install V8Js PHP...
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
This is also a major decision blocker between React and Vuejs. The react have a v8js plugin and works perfectly. I can allocate sometime next week to look if I can get any workaround. But if anyone have any progress in this use case, please inform here in this topic
+1