12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- import { fileURLToPath, URL } from 'node:url'
- import { defineConfig } from 'vite'
- import Components from 'unplugin-vue-components/vite';
- import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers';
- import vue from '@vitejs/plugin-vue'
- // https://vitejs.dev/config/
- export default defineConfig({
- base: '/spreadSheet/',
- build: {
- outDir: 'dist/spreadSheet'
- },
- plugins: [
- vue(),
- Components({
- resolvers: [AntDesignVueResolver({ importStyle: 'less' })],
- }),
- ],
- resolve: {
- alias: {
- '@': fileURLToPath(new URL('./src', import.meta.url))
- }
- },
- css: {
- preprocessorOptions: {
- less: {
- modifyVars: {
- hack: 'true; @import "@/assets/theme.less"'
- },
- javascriptEnabled: true
- }
- }
- },
- server: {
- host: '0.0.0.0',
- proxy: {
- '/service': {
- target: 'http://192.168.4.163',
- changeOrigin: true,
- rewrite: path => path.replace(RegExp(`^service`), 'service')
- },
- }
- },
- })
|