javascript - How to configure the vue project so that the url configuration file is ignored when packaging, and the server can be switched by modifying the content of the url configuration file when switching to testing and online environments
阿神
阿神 2017-06-30 10:00:10
0
1
1101

Currently, the serverurl file is created in static and is referenced in the configuration file of the http request. However, the url address will be packaged after the project is packaged, so the address cannot be modified

阿神
阿神

闭关修行中......

reply all(1)
typecho

I think you can try using the interface, of course it is the interface address of another server. For example, request http://a.com to get your serverurl. When written in the code, it is serverurl + url. Although this can meet your needs, I have never tried doing this. I don't know if it can be successful. Moreover, if the interface of another server hangs up, everything will be ruined.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template