Navigation

    GitHub中文社区
    • GitHub排行榜

    论坛

    • Login
    • Categories
    • Recent
    • Tags
    • Popular

    electron-vue

    技术交流
    2
    2
    108
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • lvyeyyy
      lvyeyyy last edited by

      electron-vue打包项目访问的后台地址会改变,怎么实现打包后通过修改某个文件,如js文件,json文件,就可以改变程序的后台地址,而不需要重新打包?

      1 Reply Last reply Reply Quote 0
      • k1995
        k1995 last edited by k1995

        最好用域名,这样后台IP变了,重新解析下域名就是了。

        通过修改配置文件方式也可以啊,你建一个config.json,然后用fs.readFileSync 读这个配置文件,拿到后台IP地址不就可以了吗?

        1 Reply Last reply Reply Quote 0
        • First post
          Last post