| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- import { defineConfig } from 'vite'
- import vue from '@vitejs/plugin-vue'
- import path from 'path'
- import Components from 'unplugin-vue-components/vite'
- import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers'
- export default defineConfig({
- plugins: [
- vue(),
- Components({
- resolvers: [
- AntDesignVueResolver({
- importStyle: false, // css in js
- })
- ],
- })
- ],
- resolve: {
- alias: {
- '@': path.resolve(__dirname, 'src')
- }
- },
- css: {
- preprocessorOptions: {
- less: {
- math: 'always',
- globalVars: {},
- modifyVars: {
- 'hack': 'true; @import "@/styles/variables.less";'
- }
- }
- }
- },
- server: {
- port: 3000,
- open: true,
- proxy: {
- // '/api': {
- // // target: 'https://jiasm.zfire.top/zfdapi/',
- // target: 'https://jiasm.zfire.top',
- // ws: true,
- // changeOrigin: true,
- // rewrite: (path) => path.replace(/^\/api/, '')
- // }
- }
- }
- })
|