export default defineNuxtConfig({
  ssr: false,
  spaLoadingTemplate: true,

  modules: ["@nuxt/ui", "@pinia/nuxt", "@enesis/editor/nuxt"],

  css: ["~/assets/main.css"],

  colorMode: {
    classSuffix: "",
  },

  devServer: { host: "0" },
  srcDir: "src/",
  ignore: ["**/src-tauri/**"],

  app: {
    head: {
      title: "Enesis Editor",
      link: [{ rel: "icon", type: "image/svg+xml", href: "/favicon.svg" }],
    },
  },

  vite: {
    clearScreen: false,
    envPrefix: ["VITE_", "TAURI_"],
    server: {
      strictPort: true,
      watch: {
        ignored: ['!**/node_modules/@enesis/editor/**'],
      },
    },
    optimizeDeps: {
      exclude: ['@enesis/editor'],
      include: [
        '@tauri-apps/api/core',
        '@tauri-apps/api/event',
        '@tauri-apps/api/menu',
        '@tauri-apps/plugin-dialog',
        '@tauri-apps/plugin-sql',
        '@tauri-apps/plugin-store',
        '@vueuse/core',
      ],
    },
  },

  compatibilityDate: "2025-06-01",
})
