npm run serve 自动跳转至http://0.0.0.0:8080/

解决方案:
在vue.config.js中添加 devServer: {host: ‘localhost’,port: 8080 }

const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
    transpileDependencies: true,
    devServer: {
        host: 'localhost',
        port: 8080
    }
})

posted @ 2022-07-21 20:11  strawberry&cigarette  阅读(549)  评论(0)    收藏  举报