Foreword
Page after encountering a very strange problem today, in vue-cli + webpack project, refresh the particular page will become blank, being given the index.html file Unexpected token <.
One strange point development environment is no problem, only the production in question, strange point two is only one page in question, other pages completely normal
text
Screenshot error:
According to the above circumstances and past experience, we should be in the index.html page and page positioning of errors that occur, but are not solve the problem.
Finally found the route at this project, after several tests, solve problems, but also to determine the reason the problem turned out to be: Route median path can not begin with a lowercase m, otherwise it will report the above error.
Write error in this environment and conditions:
vue Version: 2.5.2
vue-router: 3.0.1
webpack:3.6.0
Production environment (npm run build has been placed in the server)
Routing path to the page / m at the beginning of
Original article, reproduced please indicate the source: https://www.cnblogs.com/zhangdongya/p/11417550.html