vite.config.ts 586 B

12345678910111213141516171819202122232425262728293031
  1. import { fileURLToPath, URL } from 'node:url'
  2. import { defineConfig } from 'vite'
  3. import vue from '@vitejs/plugin-vue'
  4. // https://vitejs.dev/config/
  5. export default defineConfig({
  6. plugins: [
  7. vue(),
  8. ],
  9. css: {
  10. preprocessorOptions: {
  11. scss: {
  12. // Use Sass modern JS API to avoid legacy API warnings.
  13. api: 'modern-compiler',
  14. }
  15. }
  16. },
  17. resolve: {
  18. alias: {
  19. '@': fileURLToPath(new URL('./src', import.meta.url))
  20. }
  21. },
  22. server: {
  23. host: '127.0.0.1',
  24. port: 4000,
  25. proxy: {
  26. '/api': 'http://localhost:8090'
  27. }
  28. }
  29. })