vite.config.ts 629 B

12345678910111213141516171819202122232425262728293031
  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. css: {
  9. preprocessorOptions: {
  10. scss: {
  11. api: "modern-compiler" // or 'modern'
  12. }
  13. }
  14. },
  15. plugins: [
  16. vue(),
  17. vueJsx(),
  18. ],
  19. server: { // ← ← ← ← ← ←
  20. host: '0.0.0.0', // ← 新增内容 ←
  21. // port: 8991,
  22. },
  23. resolve: {
  24. alias: {
  25. '@': fileURLToPath(new URL('./src', import.meta.url))
  26. }
  27. }
  28. })