spatie / server-side-rendering

Server side rendering JavaScript in a PHP application
https://sebastiandedeyne.com/posts/2018/server-side-rendering-javascript-from-php
MIT License
603 stars 35 forks source link

SyntaxError: Unexpected identifier #50

Closed projct1 closed 3 years ago

projct1 commented 3 years ago
use Spatie\Ssr\Renderer;
use Spatie\Ssr\Engines\V8;

$renderer = new Renderer(new V8(new V8Js));

echo $renderer->debug()->entry($_SERVER['DOCUMENT_ROOT'] . '/../resources/js/catering/app.js')->render();

But got error on library code of method dispatchScript: vendor\spatie\server-side-rendering\src\Engines\V8.php(25): V8Js->executeString('var dispatch = ...')

It doesn't even reach my script...