// 引入Vue
import Vue from 'vue'
// 引入App组件,它是所有组件的父组件
import App from './App.vue'
// 关闭Vue的生产关系
Vue.config.productionTip = false
本地中引入vuejs的方法:1、在vue官网下载“vue.min.js”文件到本地;2、在HTML文档中使用script标签引入下载好的vue文件即可,语法“<script src="vue.min.js文件路径"></script>”。
// const { defineConfig } = require('@vue/cli-service')
// module.exports = defineConfig({
// transpileDependencies: true
// })
module.exports = {
pages: {
index: {
//入口
entry: 'src/main.js',
},
},
lintOnSave:false, //关闭语法检查
// 第一种方式代理
// devServer:{
// proxy: 'https://api.apiopen.top'
// proxy: 'http://localhost:5000'
// },
// 第二种写法
devServer: {
proxy: {
'/school': {
target: 'https://api.apiopen.top',
pathRewrite:{'^/school':''},
ws: true, //用于支持websocket
changeOrigin: true //用于控制请求头中的host值
},
'/bana': {
target: 'http://localhost:5000',
pathRewrite:{'^/bana':''},
ws: true, //用于支持websocket
changeOrigin: false //用于控制请求头中的host值