next-intlayer
Version:
Simplify internationalization i18n in Next.js with context providers, hooks, locale detection, and multilingual content integration.
38 lines (37 loc) • 1.27 kB
TypeScript
import { NextConfig } from "next";
import { GetConfigurationOptions } from "@intlayer/config";
//#region src/server/withIntlayer.d.ts
type WithIntlayerOptions = GetConfigurationOptions & {
enableTurbopack?: boolean;
};
/**
* 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)
* ```
*/
declare const withIntlayerSync: <T extends Partial<NextConfig>>(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.
*
*/
declare const withIntlayer: <T extends Partial<NextConfig>>(nextConfig?: T, configOptions?: WithIntlayerOptions) => Promise<NextConfig & T>;
//#endregion
export { withIntlayer, withIntlayerSync };
//# sourceMappingURL=withIntlayer.d.ts.map