36 lines
882 B
JavaScript
36 lines
882 B
JavaScript
import { withPayload } from "@payloadcms/next/withPayload";
|
|
import packageJson from "./package.json" with { type: "json" };
|
|
|
|
|
|
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
// Your Next.js config here
|
|
env: {
|
|
version: packageJson.version,
|
|
},
|
|
webpack: (webpackConfig) => {
|
|
webpackConfig.resolve.extensionAlias = {
|
|
".cjs": [".cts", ".cjs"],
|
|
".js": [".ts", ".tsx", ".js", ".jsx"],
|
|
".mjs": [".mts", ".mjs"],
|
|
};
|
|
|
|
return webpackConfig;
|
|
},
|
|
transpilePackages: [
|
|
"@payloadcms/richtext-lexical",
|
|
"lexical",
|
|
"@lexical/react",
|
|
"@lexical/rich-text",
|
|
"@lexical/history",
|
|
"@lexical/list",
|
|
"@lexical/link",
|
|
"@lexical/markdown",
|
|
"@lexical/selection",
|
|
"@lexical/table",
|
|
"@lexical/utils",
|
|
],
|
|
output: "standalone",
|
|
};
|
|
|
|
export default withPayload(nextConfig, { devBundleServerPackages: true });
|