-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
本人遇到 mode:'history' 模式 下的404问题,可以给你参考一下。 #3289
Comments
dseeker
added a commit
to dseeker/vue-element-admin
that referenced
this issue
Nov 8, 2020
fixes breaking to 404 page in history mode when publicPath sub path is set
@PanJiaChen quick fix, PR opened just needs a merge |
This was referenced Dec 24, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
本人遇到 mode:'history' 模式 下的404问题,可以给你参考一下。
当在vue.config.js 配置
publicPath: '/public/'
的时候,虽然资源文件能加载到,但是路由一直跳转404,是因为路由还是localhost:4200/xxx,而不是根据publicPath来转变成localhost:4200/public/xxx。解决办法是:在router/index.js还需要加入base: /public
,可以配置到环境变量就是Originally posted by @PhotonAlpha in #2812 (comment)
The text was updated successfully, but these errors were encountered: