1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- import { fileURLToPath, URL } from 'node:url';
- import { defineConfig } from 'vite';
- import vue from '@vitejs/plugin-vue';
- import postcssPxToViewport from 'postcss-px-to-viewport';
- import commonjs from 'vite-plugin-commonjs';
- export default defineConfig({
- plugins: [
- vue(),
- commonjs({
- include: /utils\/map\/CityGis.Bridge.js/,
- exclude: [],
- extensions: ['.js'],
- ignoreGlobal: false,
- sourceMap: false,
- namedExports: {},
- ignore: [],
- transformMixedEsModules: true
- })
- ],
- server: {
- proxy: {
- '/api': {
-
- target: 'http://10.1.161.187:7878/',
- secure: false,
- changeOrigin: true,
- rewrite: (path) => path.replace(/^\/api/, '')
- }
- }
- },
- 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
-
- })
- ]
- }
- }
- });
|