Files
hellogithub-vue/vue.config.js

27 lines
602 B
JavaScript

require('@vue/cli-service')
// module.exports = defineConfig({
// transpileDependencies: true,
// lintOnSave: false
// })
module.exports = {
runtimeCompiler: true,
// 关闭语法检查
lintOnSave:false,
devServer: {
// host: 'localhost', // 本地域名/ip地址
// port: '8080', // 端口号
proxy: {
'/api': {
//后端接口的baseurl
target: 'https://api.github.com/repos',
//是否允许跨域
changeOrigin: true,
pathRewrite: {
//这里的作用是使用去掉api
'^/api': ''
}
}
}
}
}