rcpress
rcpress copied to clipboard
build之后直接打开index.html是空白的,看不了。
dev模式下一切正常的;
build之后打开dist里面的index.html直接白屏
我看是404,将index.html改成相对路径,还是不行
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width,initial-scale=1"
/>
<title></title>
<link href="./assets/css/styles.5562608a.css" rel="stylesheet"></head>
<body>
<div id="app"></div>
<script type="text/javascript" src="./assets/js/app.51774c8b.js"></script></body>
</html>
console里面是这样的
app.51774c8b.js:6 [RcPress] No matching page found for sidebar item "/guide/group-1-item"
app.51774c8b.js:6 [RcPress] No matching page found for sidebar item "/guide/group-2-item"
app.51774c8b.js:1 GET file:///C:/assets/css/7.styles.bd572ada.css net::ERR_FILE_NOT_FOUND
app.51774c8b.js:1 GET file:///C:/assets/js/7.51774c8b.js net::ERR_FILE_NOT_FOUND
app.51774c8b.js:1 GET file:///C:/assets/css/5.styles.88182343.css net::ERR_FILE_NOT_FOUND
app.51774c8b.js:1 GET file:///C:/assets/js/notFoundWrapper.51774c8b.js net::ERR_FILE_NOT_FOUND
app.51774c8b.js:27 Error: Loading CSS chunk 5 failed.
(/assets/css/5.styles.88182343.css)
at HTMLLinkElement.n.<computed>.n.<computed>.<computed>.c.push.n.<computed>.f.onerror (app.51774c8b.js:1)
app.51774c8b.js:1 Uncaught (in promise) Error: Loading CSS chunk 7 failed.
app.51774c8b.js:1 Uncaught (in promise) Error: Loading CSS chunk 5 failed.
(/assets/css/5.styles.88182343.css)
at HTMLLinkElement.n.<computed>.n.<computed>.<computed>.c.push.n.<computed>.f.onerror (app.51774c8b.js:1)
需要使用nginx托管