import tailwindcss from "@tailwindcss/vite";

export default defineNuxtConfig({
  compatibilityDate: "2024-11-01",
  devtools: { enabled: false },
  // app: {
  //   pageTransition: { name: "page", mode: "out-in" },
  // },
  // nitro: {
  //   routeRules: {
  //     "/api/**": {
  //       proxy: {
  //         to: `${process.env.POCKETBASE_URL || "http://127.0.0.1:8090"}/api/**`,
  //       },
  //     },
  //   },
  // },

  modules: ["@pinia/nuxt", "@nuxt/eslint", "@nuxt/ui", "@nuxtjs/i18n"],

  // @nuxtjs/i18n"
  // i18n: {
  //   locales: [
  //     { code: "pl", name: "Polski", icon: "emojione:flag-for-poland" },
  //     { code: "en", name: "English", icon: "emojione:flag-for-united-kingdom" },
  //   ],
  //   lazy: true,
  //   defaultLocale: "en",
  //   strategy: "prefix",
  //   bundle: {
  //     optimizeTranslationDirective: false,
  //   },
  // },
  css: ["@/assets/fonts.css", "@/assets/main.css"],
  vite: {
    plugins: [tailwindcss()],
    build: {
      sourcemap: false,
    },
    server: {
      allowedHosts: ["arina.ma-al.pl", "marek.ma-al.pl"],
      watch: {
        ignored: ["**/backend/pb_data/**"],
      },
    },
  },
  typescript: {
    tsConfig: {
      compilerOptions: {
        typeRoots: ["./ts", "./node_modules/@types"],
      },
      include: ["./ts"],
    },
  },
  ui: {},
  icon: {
    localApiEndpoint: "/___nuxt_icon",
  },
});
