Supports bi-directional import/export between MDX <=> Lexical. JSX will be mapped to lexical blocks back and forth. This will allow editing our mdx docs in payload while keeping mdx as the source of truth --------- Co-authored-by: Germán Jabloñski <43938777+GermanJablo@users.noreply.github.com>
24 lines
561 B
TypeScript
24 lines
561 B
TypeScript
import type { I18nClient } from '@payloadcms/translations'
|
|
import type { ClientConfig, ImportMap, SanitizedConfig } from 'payload'
|
|
|
|
import { createClientConfig } from 'payload'
|
|
import { cache } from 'react'
|
|
|
|
export const getClientConfig = cache(
|
|
async (args: {
|
|
config: SanitizedConfig
|
|
i18n: I18nClient
|
|
importMap: ImportMap
|
|
}): Promise<ClientConfig> => {
|
|
const { config, i18n, importMap } = args
|
|
|
|
const clientConfig = createClientConfig({
|
|
config,
|
|
i18n,
|
|
importMap,
|
|
})
|
|
|
|
return Promise.resolve(clientConfig)
|
|
},
|
|
)
|