i used prerender-spa-plugin and i get a .html , but can't include data which i requrest
See original GitHub issuenew PrerenderSpaPlugin({
staticDir: path.join(__dirname,'./dist'),
indexPath: path.join(__dirname, 'dist', 'index.html'),
routes: ['/','/hotNews','/findNews'],
// 定时捕获
renderer: new Renderer({
renderAfterTime: 5000,
// 监听到自定事件时捕获
captureAfterDocumentEvent: 'custom-post-render-event'
})
// document.dispatchEvent(new Event('custom-post-render-event'))
// 查询到指定元素时捕获
// captureAfterElementExists: '#content',
})
<body>
<div id="app"><div data-v-fed36922="" class="homePage"><header data-v-f425c67e="" data-v-fed36922="" class="navBar"><nav data-v-fed36922="" data-v-f425c67e="" class="nav-til"><a data-v-fed36922="" data-v-f425c67e="" href="javascript:" class="nav-item">沸点</a><a data-v-fed36922="" data-v-f425c67e="" href="javascript:" class="nav-item active-item">发现</a> <span data-v-fed36922="" data-v-f425c67e="" class="nav-border" style="left: 400px;"></span></nav></header> <section data-v-41d22626="" data-v-fed36922="" class="hot"><ul data-v-41d22626=""></ul></section> <footer data-v-51d2507f="" data-v-fed36922=""><div data-v-fed36922="" data-v-51d2507f="">
prerender测试
</div></footer></div></div>
<script type="text/javascript" src="/bundle.js"></script>
</body>
just static data no request data0 0
Issue Analytics
- State:
- Created 5 years ago
- Comments:14
Top Results From Across the Web
Error: Build failing using prerender-spa-plugin #312 - GitHub
Build fails when I attempt to npm run build when using prerender-spa-plugin. It looks like I'm facing pretty much the same issue described ......
Read more >javascript - Webpack prerender-spa-plugin with compression ...
html is correctly gzipped. However, the resulting index.html (the page that is the result of the prerendering) is not gzipped. How can I...
Read more >The easiest way to improve your Vue.js application. Part 1
Prerendering is a process to preload all elements on the page and generate the static HTML of your Single Page Application. Advantages of ......
Read more >Setup prerender on webpack with prerender-spa-plugin, Part 1
SSR - gathers page's required data and creates an HTML right on client request Prerender - creates an HTML page early by running...
Read more >prerender-spa-plugin - Bountysource
I'm having some issue that I can't solve with the current options. I have a "cookie consent" script, but this scripts renders some...
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
@chentianyuan Oooh, it’s because
prerender-spa-plugin
doesn’t use webpack-dev-server. It loads the files directly, so there is no API proxy when it prerenders.ok ,maybe i can making a nginx conf outside to solve my proxy problem 。thankyou very much @Tribex , you are a good man .