vite.config.ts 657 B

1234567891011121314151617181920212223242526272829303132
  1. import { fileURLToPath, URL } from 'node:url'
  2. import { defineConfig } from 'vite'
  3. import vue from '@vitejs/plugin-vue'
  4. import vueJsx from '@vitejs/plugin-vue-jsx'
  5. // https://vitejs.dev/config/
  6. export default defineConfig({
  7. // base: '/highLevelIntellectual/',
  8. base: '/fireBrigade/',
  9. css: {
  10. preprocessorOptions: {
  11. scss: {
  12. api: "modern-compiler" // or 'modern'
  13. }
  14. }
  15. },
  16. plugins: [
  17. vue(),
  18. vueJsx(),
  19. ],
  20. server: { // ← ← ← ← ← ←
  21. host: '0.0.0.0', // ← 新增内容 ←
  22. // port: 8991,
  23. },
  24. resolve: {
  25. alias: {
  26. '@': fileURLToPath(new URL('./src', import.meta.url))
  27. }
  28. }
  29. })