diff --git a/package/src/i18next/index.ts b/package/src/i18next/index.ts index 3f47e97..cd5aa17 100644 --- a/package/src/i18next/index.ts +++ b/package/src/i18next/index.ts @@ -1,6 +1,6 @@ import { join, relative } from "node:path"; import { fileURLToPath } from "node:url"; -import { watchDirectory, defineUtility } from "astro-integration-kit"; +import { defineUtility, watchDirectory } from "astro-integration-kit"; import { normalizePath } from "vite"; import type { Options } from "../options.js"; import { getNamespaces } from "./namespaces.js"; diff --git a/package/src/integration.ts b/package/src/integration.ts index 88ba378..6fd61ff 100644 --- a/package/src/integration.ts +++ b/package/src/integration.ts @@ -1,10 +1,10 @@ import { readFileSync } from "node:fs"; import { - createResolver, - defineIntegration, addDts, addIntegration, addVirtualImports, + createResolver, + defineIntegration, } from "astro-integration-kit"; import { handleI18next } from "./i18next/index.js"; import { optionsSchema } from "./options.js"; diff --git a/package/src/middleware.ts b/package/src/middleware.ts index e99a35c..780ef72 100644 --- a/package/src/middleware.ts +++ b/package/src/middleware.ts @@ -1,6 +1,6 @@ -import { defineMiddleware } from "astro/middleware"; import { als } from "virtual:astro-i18n/als"; import { i18nextConfig, options, routes } from "virtual:astro-i18n/internal"; +import { defineMiddleware } from "astro/middleware"; const extractLocaleFromUrl = (pathname: string) => { for (const locale of options.locales) { diff --git a/package/src/routing/index.ts b/package/src/routing/index.ts index 93ec3f3..ff8942d 100644 --- a/package/src/routing/index.ts +++ b/package/src/routing/index.ts @@ -1,7 +1,7 @@ +import { defineUtility } from "astro-integration-kit"; import type { Options } from "../options.js"; import { handleRoutesHMR } from "./hmr.js"; import { registerRoutes } from "./register.js"; -import { defineUtility } from "astro-integration-kit"; export const ROUTES_DIR = "routes"; const LOGGER_LABEL = "astro-i18n/routing"; diff --git a/package/src/routing/register.ts b/package/src/routing/register.ts index 8554178..6c03ece 100644 --- a/package/src/routing/register.ts +++ b/package/src/routing/register.ts @@ -6,6 +6,7 @@ import type { HookParameters, InjectedRoute, } from "astro"; +import { defineUtility } from "astro-integration-kit"; import { addPageDir } from "astro-pages"; import { AstroError } from "astro/errors"; import { withLeadingSlash } from "ufo"; @@ -13,7 +14,6 @@ import { normalizePath } from "vite"; import type { Options } from "../options.js"; import type { Route } from "../types.js"; import { ROUTES_DIR } from "./index.js"; -import { defineUtility } from "astro-integration-kit"; const isPrerendered = (str: string) => { const match = str.match(/export const prerender = (\w+)/); diff --git a/playground/astro.config.mts b/playground/astro.config.mts index ff24c5d..27dee4d 100644 --- a/playground/astro.config.mts +++ b/playground/astro.config.mts @@ -1,9 +1,9 @@ import node from "@astrojs/node"; import react from "@astrojs/react"; import tailwind from "@astrojs/tailwind"; -import { defineConfig } from "astro/config"; import { createResolver } from "astro-integration-kit"; import { hmrIntegration } from "astro-integration-kit/dev"; +import { defineConfig } from "astro/config"; const { default: i18n } = await import("@astrolicious/i18n");