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

Multi-page multi-route: When directly refresh in the sub-routing page, "Uncaught SyntaxError: Unexpected token <" error happened #10859

kluslulu opened this issue Nov 23, 2019 · 2 comments


Copy link

@kluslulu kluslulu commented Nov 23, 2019



Reproduction link

Steps to reproduce

I created a multi-page app by vue-cli3.
when I in a sub-routing page,if I refresh this page by command R directly,it will be showing a white page

What is expected?

I hope to refresh success in a sub-routing page

What is actually happening?

Showing a white page and some error in console:
Uncaught SyntaxError: Unexpected token '<'
index.js:1 Uncaught SyntaxError: Unexpected token '<'


This comment has been minimized.

Copy link

@shadowings-zy shadowings-zy commented Nov 23, 2019

I think your project will show a white page after refresh because your vue-router is using history mode in your project.
You can fix it by using hash mode or configure your server to redirect the correct route.


This comment has been minimized.

Copy link

@posva posva commented Nov 23, 2019

Hi, thanks for your interest but Github issues are for bug reports and feature requests only. You can ask questions on the forum, the Discord server or StackOverflow.

@posva posva closed this Nov 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.