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

npm run preview打开页面空白 #2459

Open
daretodream55 opened this issue Aug 9, 2019 · 5 comments
Open

npm run preview打开页面空白 #2459

daretodream55 opened this issue Aug 9, 2019 · 5 comments

Comments

@daretodream55
Copy link

Bug report(问题描述)

使用npm run preview 打包成功生成dist文件夹,使用file协议可以打开dist目录下的index文件出现登录界面,可是使用http://localhost:9526/访问时页面空白

Steps to reproduce(问题复现步骤)

npm run preview
使用浏览器打开 http://localhost:9526/

Screenshot or Gif(截图或动态图)

image

image

Other relevant information(格外信息)

  • Your OS:
  • Node.js version:8.9.3
  • vue-element-admin version:master上的最新版本
@PanJiaChen
Copy link
Owner

image

为什么多了一个 . ?

@daretodream55
Copy link
Author

不知道为啥,运行preview就自动生成了这个浏览网址

@limuen
Copy link

limuen commented Aug 13, 2019

现在我也出现了这种情况
npm run preview -- --report 以后出现的网址是> Preview at http://localhost:9526./

@yuanxin778
Copy link

我也遇到这个问题了~~~ 这是为嘛? 你们解决了吗?

@ErHu1993
Copy link

ErHu1993 commented Jan 9, 2020

出现 http://localhost:9526./ 的原因是设置了publicPath为'./', 改成 '/'即可 , 运行 npm run preview -- --report 即可查看

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

No branches or pull requests

5 participants