import { FieldRenameMapByDictionaryKey } from "./prepareSwcOptimization.js"; import { MINIMUM_SWC_PLUGIN_NEXT_VERSION, getIsSwcPluginSupported } from "./swcPluginCompatibility.js"; import { NextConfig } from "next"; import { CallerDescriptor } from "@intlayer/config/callers"; import { GetConfigurationOptions } from "@intlayer/config/node"; //#region src/server/withIntlayer.d.ts type WithIntlayerOptions = GetConfigurationOptions & { enableTurbopack?: boolean; /** * Compat-adapter caller descriptors injected by a compat package's bundler * plugin (e.g. `@intlayer/next-intl/plugin`). They drive both the SWC * optimize rewrite and the Node-side usage analysis, so one registry slice * is all a compat plugin has to pass. */ compatCallers?: CallerDescriptor[]; /** * Field-rename tables produced by the purge / minify pipeline, forwarded to * the `@intlayer/swc` plugin so it rewrites source accesses to match the * renamed dictionaries. * * @internal Set by {@link withIntlayer}; `withIntlayerSync` on its own runs * no dictionary rewrite, so it leaves this unset and no rename is applied. */ fieldRenameMap?: FieldRenameMapByDictionaryKey; }; /** * A Next.js plugin that adds the intlayer configuration to the webpack configuration * and sets the environment variables * * Usage: * * ```ts * // next.config.js * export default withIntlayerSync(nextConfig) * ``` */ export declare const withIntlayerSync: >(nextConfig?: T, configOptions?: WithIntlayerOptions) => NextConfig & T; /** * A Next.js plugin that adds the intlayer configuration to the webpack configuration * and sets the environment variables * * Usage: * * ```ts * // next.config.js * export default withIntlayer(nextConfig) * ``` * * > Node withIntlayer is a promise function. Use withIntlayerSync instead if you want to use it synchronously. * > Using the promise allows to prepare the intlayer dictionaries before the build starts. * */ export declare const withIntlayer: >(nextConfig?: T | Promise, configOptions?: WithIntlayerOptions) => Promise; //#endregion export { MINIMUM_SWC_PLUGIN_NEXT_VERSION, getIsSwcPluginSupported }; //# sourceMappingURL=withIntlayer.d.ts.map