I create my project with vue-cli 3.0
. Initially it runs ok. But after I
then npm run serve
again, it keep throwing erro
I have the same problem. in index.html file , I just write this script tag,like this :
if I change src attr like this:
ok, no error 'Unexpected token <' dispaly.
here is a another problem happened,it is upsetting to me .
online build product tests that dispaly I can't access this site and get resource. OMG ! ok, I change this src again like this:
and then make some changes in vue.config.js like this:
baseUrl:'./'
assetsDir:'./'
so,online everything is ok ,but in my local project run it will get this error.
finally,I find this :
online url address: http://xxxxx.cn/test0001/#/
local url address: http://192.168.5.108:9000/test0001/#/
(ps:test0001 params can't remove,my project need it)
if I remove this params 'test0001', this error isn't display in my local project test .
I guess build and development environment's difference cause this error,and my params test0001 in url address.
finally,I just use a param to diff this product and development to solve it.
if someone meet this problem like me , please share your solution.