vite.config.ts 710 B

12345678910111213141516171819202122232425262728293031
  1. import { defineConfig } from 'vite'
  2. import vue from '@vitejs/plugin-vue'
  3. import { resolve } from 'pathe'
  4. import AutoImport from 'unplugin-auto-import/vite'
  5. import Components from 'unplugin-vue-components/vite'
  6. // https://vitejs.dev/config/
  7. export default defineConfig({
  8. plugins: [vue({
  9. template: {
  10. compilerOptions: {
  11. isCustomElement: tag => tag.startsWith('Tres') && tag !== 'TresCanvas',
  12. },
  13. },
  14. }),
  15. AutoImport({
  16. dts: true,
  17. eslintrc: {
  18. enabled: true, // <-- this
  19. },
  20. imports: ['vue'],
  21. }),
  22. Components({ /* options */ }),],
  23. resolve: {
  24. alias: {
  25. '/@': resolve(__dirname, '../src'),
  26. },
  27. dedupe: ['@tresjs/core', 'three'],
  28. },
  29. })