Open Liuyll opened 3 years ago
在?csr=true时,渲染的html如下
?csr=true
<html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>easy-react-ssr</title> <link href="/index.css" rel="stylesheet"></head> <!-- <script src="https://cdn.bootcdn.net/ajax/libs/react/17.0.1/cjs/react.development.js"></script> <script src="https://cdn.bootcdn.net/ajax/libs/react-dom/17.0.1/cjs/react-dom.development.js"></script> --> <body> <div id="app"> <!--server render body--> </div> <script type="text/javascript" src="/runtime~index.file.js"></script><script type="text/javascript" src="/vendor.chunk.js"></script><script type="text/javascript" src="/index.chunk.js"></script></body> </html>
导致直接访问了koa-static的静态文件,连接没有断开,第二次刷新出现的econnreset
定位到的是vendor.chunk.js文件
vendor.chunk.js
在
?csr=true
时,渲染的html如下导致直接访问了koa-static的静态文件,连接没有断开,第二次刷新出现的econnreset