国外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.

25 lines
638 B

  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. });