vue cli - Uncaught SyntaxError: Unexpected token <

前端 未结 14 2293
说谎
说谎 2020-12-31 03:39

I create my project with vue-cli 3.0. Initially it runs ok. But after I -c then npm run serve again, it keep throwing erro

14条回答
  •  情书的邮戳
    2020-12-31 04:09

    I had the same issue when deploying to a sub directory on our Azure web server using Vue CLI 3.10. Our site was fine until we changed the routing from history to hash mode which caused this error.

    I had to change the links in the index.html page to get it working.

    The deployment build gives you this...

    
    

    …but we had to change it to the following for it to work...

    
    

提交回复
热议问题