vite.config.ts 798 B

1234567891011121314151617181920212223242526272829303132333435
  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. import glsl from 'vite-plugin-glsl'
  7. import UnoCSS from 'unocss/vite'
  8. import { templateCompilerOptions } from '@tresjs/core'
  9. // https://vitejs.dev/config/
  10. export default defineConfig({
  11. plugins: [
  12. glsl(),
  13. vue(templateCompilerOptions),
  14. AutoImport({
  15. dts: true,
  16. eslintrc: {
  17. enabled: true, // <-- this
  18. },
  19. imports: ['vue'],
  20. }),
  21. Components({
  22. /* options */
  23. }),
  24. UnoCSS({
  25. /* options */
  26. }),
  27. ],
  28. resolve: {
  29. alias: {
  30. '@tresjs/core': resolve(__dirname, '../src/index.ts'),
  31. },
  32. dedupe: ['three'],
  33. },
  34. })