国外MOSE官网
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
683 B

2 weeks ago
2 weeks ago
2 weeks ago
1 week ago
2 weeks ago
  1. import { defineConfig } from 'vite'
  2. import vue from '@vitejs/plugin-vue'
  3. import tailwindcss from '@tailwindcss/vite'
  4. import path from 'path'
  5. // https://vite.dev/config/
  6. export default defineConfig({
  7. plugins: [
  8. vue(),
  9. tailwindcss(),
  10. ],
  11. server: {
  12. port: 3000,
  13. },
  14. resolve: {
  15. alias: {
  16. '@': path.resolve(__dirname, './src'),
  17. 'vue': 'vue/dist/vue.esm-bundler.js'
  18. },
  19. dedupe: ['vue', 'vue-i18n', 'swiper']
  20. },
  21. // 优化模块预加载
  22. optimizeDeps: {
  23. include: ['vue', 'vue-i18n', 'swiper', 'swiper/vue', 'swiper/modules']
  24. },
  25. // 忽略 TypeScript 错误
  26. esbuild: {
  27. logOverride: { 'this-is-undefined-in-esm': 'silent' }
  28. }
  29. })