在vue.config.js
文件中添加devServer
对象
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
devServer: {
host: 'localhost',
port: 8889,
open: true
},
lintOnSave: false
})