vite.config.ts 732 B

12345678910111213141516171819202122232425262728293031
  1. import {defineConfig} from "vite";
  2. import uni from "@dcloudio/vite-plugin-uni";
  3. import AutoImport from 'unplugin-auto-import/vite';
  4. import Components from 'unplugin-vue-components/vite';
  5. import {VantResolver} from '@vant/auto-import-resolver';
  6. import proxy from "./src/config/proxy";
  7. export default defineConfig({
  8. plugins: [
  9. uni(),
  10. AutoImport({
  11. resolvers: [VantResolver()],
  12. }),
  13. Components({
  14. resolvers: [VantResolver()],
  15. }),
  16. ],
  17. css: {
  18. postcss: {
  19. plugins: [require('autoprefixer'), require('tailwindcss')],
  20. },
  21. },
  22. server: {
  23. host: '0.0.0.0',
  24. port: 5173,
  25. proxy,
  26. },
  27. optimizeDeps: {
  28. include: ['@dcloudio/uni-ui/lib/uni-file-picker/uni-file-picker.vue'],
  29. },
  30. })