123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- import { defineConfig } from 'vite'
- import vue from '@vitejs/plugin-vue'
- import eslintPlugin from '@nabla/vite-plugin-eslint'
- export default defineConfig(({ mode }) => {
- return {
- base: mode === 'production' ? '/' : '/',
- server: {
- host: '0.0.0.0',
- port: 9527,
- proxy: {
- '/api': {
- target: 'http://zohocrm.promocollection.com.au:9007/',
- changeOrigin: true,
- rewrite: (path) => path.replace(/^\/api/, ''),
- },
- },
- },
- resolve: {
- alias: {
- '@': '/src/',
- },
- },
- css: {
- devSourcemap: true,
- preprocessorOptions: {
- scss: {
- additionalData: `@import '@/assets/css/var.scss';`,
- },
- },
- },
- plugins: [
- vue({ template: { compilerOptions: { hoistStatic: false } } }),
- eslintPlugin(),
- ],
- build: {
-
- target: 'es2020',
-
- sourcemap: false,
-
- chunkSizeWarningLimit: 1000,
-
- reportCompressedSize: false,
- },
- }
- })
|