Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build之后直接打开index.html是空白的,看不了。 #29

Open
mywebc opened this issue Jul 17, 2020 · 1 comment
Open

build之后直接打开index.html是空白的,看不了。 #29

mywebc opened this issue Jul 17, 2020 · 1 comment

Comments

@mywebc
Copy link

mywebc commented Jul 17, 2020

dev模式下一切正常的;

build之后打开dist里面的index.html直接白屏
image

我看是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>

image

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)
@wangyi7099
Copy link
Member

需要使用nginx托管

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants