1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- 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({
- publicDir: 'public',
- base: './',
- plugins: [vue()],
- server: {
- port: '8090',
- host: '0.0.0.0',
- proxy: {
- '/api': {
-
- target: 'http://10.1.161.187:7878/',
- secure: false,
- changeOrigin: true,
- rewrite: (path) => path.replace(/^\/api/, '')
- },
- '/cityGIsApi': {
-
- target: 'http://10.1.161.113:18080/',
- secure: false,
- changeOrigin: true,
- rewrite: (path) => path.replace(/^\/cityGIsApi/, '')
- }
- }
- },
- resolve: {
- alias: {
- '@': fileURLToPath(new URL('./src', import.meta.url))
- }
- },
- css: {
- postcss: {
- plugins: [
- postcssPxToViewport({
- viewportWidth: 1950,
- viewportHeight: 1080,
- unitPrecision: 3,
- viewportUnit: 'vw',
- fontViewportUnit: 'vw',
- selectorBlackList: [],
- minPixelValue: 2,
- mediaQuery: true,
- propList: ['*', '!min-width', '!min-height'],
- minValue: 10
-
- })
- ]
- }
- }
- });
|