Open surahe opened 6 years ago
From the readme:
renderer: new Renderer({
// Optional - The name of the property to add to the window object with the contents of `inject`.
injectProperty: '__PRERENDER_INJECTED',
// Optional - Any values you'd like your app to have access to via `window.injectProperty`.
inject: {
foo: 'bar'
},
So you can check from JS if __PRERENDER_INJECTED
is in window or not and even add some information to that object.
Don't know if this is supoorted in V2 but I would adivice you update to V3 anyway since PhantomJS development is discontinued and Puppetter just rocks.
I use Vue.js V2 with prerender-spa-plugin V2 and now I am in trouble.
In this case,after prerender the .html file is rendered as
and DOM will appear before the mask show.
On the other hand, I initialize some UI plugins in main.js:
this will mount DOM in
but as prerender and online environment run it,finally two same DOMs will add in .How can I judge the environment is prerende or online in javascript?Should I update prerender-spa-plugin to V3?