Closed michaelpomogajko closed 2 years ago
Running next build with the withSuperjson wrapper function fails because of ts errors, meaning it ignores the config for nextjs. When removing the wrapper function, it works as expected
next build
const { withSuperjson } = require('next-superjson') const config = { reactStrictMode: true, swcMinify: true, eslint: { ignoreDuringBuilds: true }, typescript: { ignoreBuildErrors: true } } module.exports = withSuperjson(config);
You have to call it like this
module.exports = withSuperjson()({})
I kept a first parameter to pass options to superjson and not pollute the config object
Running
next build
with the withSuperjson wrapper function fails because of ts errors, meaning it ignores the config for nextjs. When removing the wrapper function, it works as expected