1 Star 3 Fork 0

Atidotes/graduation

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
vite.config.js 744 Bytes
Copy Edit Raw Blame History
Atidotes authored 2022-05-18 17:02 . 更改天数
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import eslintPlugin from 'vite-plugin-eslint'
import { resolve } from 'path'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
eslintPlugin()
],
// 别名
resolve: {
alias: {
'@': resolve(__dirname, './src')
}
},
// 引入全局变量
css: {
preprocessorOptions: {
less: {
additionalData: '@import "@/styles/variable.less";'
}
}
},
server: {
// 配置跨域
proxy: {
'/api': {
target: 'http://localhost:3000',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
}
},
// 配置端口号
port: 8080
}
})
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/Atidotes/graduation.git
git@gitee.com:Atidotes/graduation.git
Atidotes
graduation
graduation
master

Search