Open alexis-regnaud opened 5 years ago
After testing, the blocked statu is only in dev build, in a prod build 100% are emitting.. In my proccess will not be a blocking problem because the prerender will be only in prod build.
But I have always a issu, my compiled assets are in a build folder (.js and .css) but actualy in the index.html the link is :
<script type="text/javascript" src="/entrypoint.1429cc83.js"></script>
Instead of :
<script type="text/javascript" src="/build/entrypoint.1429cc83.js"></script>
I tried to change .setPublicPath('/') in .setPublicPath('/build') or .setPublicPath('/build/') but the building again blocked to 95% ..
I have the same problem that I was build the official example, which is always blocked and shows "98% after emitting PrerenderSPAPlugin". When I removed the renderAfterDocumentEvent, it worked.
It stays at 98% cos PrerenderSPAPlugin is waiting for DocumentEvent to fire but it's not firing. It will actually keep waiting forever, so try figure out why DocumentEvent is not firing and you have your way!
you should move document.dispatchEvent(new Event('render-event')) to root. like this: let app = new Vue({ el: '#app', router, render: h => h(App), mounted() { // You'll need this for renderAfterDocumentEvent. setTimeout(() => { document.dispatchEvent(new Event('render-event')); }, 5000); }, });
Hey,
I Use VueJs + webpack encore (Symfony 3). I would use the prerender-spa-plugin but when I defined a renderAfterDocumentEvent option, my npm run dev building is blocked at 95% emitting.
If I remove the renderAfterDocumentEvent option, the running has 100% but pages html are empty :
index.html :![image](https://user-images.githubusercontent.com/15250423/48121570-93970880-e275-11e8-88ff-0e6891a847fe.png)
This is my webpackconfig.js :