//@ts-check
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { withNx } = require('@nrwl/next/plugins/with-nx');
/**
* @type {import('@nrwl/next/plugins/with-nx').WithNxOptions}
**/
const nextConfig = {
experimental: {
swcPlugins: [['next-superjson-plugin', {}]],
},
nx: {
// Set this to true if you would like to to use SVGR
// See: https://github.com/gregberge/svgr
svgr: false,
},
};
module.exports = withNx(nextConfig);
Verify Next.js canary release
Describe the bug
I'm trying to implement this with a next.js project generated with nx.
Expected behavior
I'm still getting the same serialization error.
It gave the error that its picking up the swc config too:
warn - You have enabled experimental feature (swcPlugins) in next.config.js.
.If I update the string to something random, it throws an error, so that means it is running that swc plugin code I think.
Reproduction link
https://github.com/shawnmclean/next-superjson-nx
Version
0.5.4
Config
Additional context
No response