Closed kkyu27 closed 6 years ago
Looks like things are (meanwhile) wrong with the tutorial -- haven't tried it out myself.
Yet the JS source tries to access window
which is a browser API thing and not JS core itself. So you need to modify the JS code you execute via executeString
to not directly access window
. Either you don't perform the access at all or you provide a shim object.
thank you, I realized what is the problem.
kkyu27 How did you solve this problem? I also have problems like this . tks
@dinhhoainam23894 hey, check your vue.js or app.js
the cause was using Window object like bootstrap before serverisde sentence. try annotation each line then you are gonna see ssr is worked!
I followed https://dzone.com/articles/server-side-rendering-with-laravel-amp-vuejs-25 this page and installed V8Js. But $v8->executeString($app_source); make an error that V8Js::compileString():14026: ReferenceError: window is not defined.
I have no idea how can I handle this error..