1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- import { fileURLToPath, URL } from 'node:url';
- import { defineConfig } from 'vite';
- import vue from '@vitejs/plugin-vue';
- import postcssPxToViewport from 'postcss-px-to-viewport';
- export default defineConfig({
- plugins: [vue()],
- server: {
- base: './',
- port: '8098',
- host: '0.0.0.0',
- proxy: {
- '/api': {
-
- target: 'http://10.1.163.187:7878/',
- secure: false,
- changeOrigin: true,
- rewrite: (path) => path.replace(/^\/api/, '')
- },
- '/cityGIsApi': {
-
-
-
- target: 'http://10.1.161.53:9082/',
- secure: false,
- changeOrigin: true,
- rewrite: (path) => path.replace(/^\/cityGIsApi/, '')
- },
- '/vmap': {
-
-
-
- target: 'http://10.1.161.53:9082/',
- secure: false,
- changeOrigin: true
- }
- }
- },
- resolve: {
- alias: {
- '@': fileURLToPath(new URL('./src', import.meta.url))
- }
- },
- css: {
- postcss: {
- plugins: [
- postcssPxToViewport({
- viewportWidth: 1080,
- viewportHeight: 1080,
- unitPrecision: 3,
- viewportUnit: 'vh',
- fontViewportUnit: 'vh',
- selectorBlackList: [],
- minPixelValue: 2,
- mediaQuery: true,
- propList: ['*', '!min-width', '!min-height'],
- minValue: 10
-
- })
- ]
- }
- }
- });
|