next-intercept-stdout
Next.js plugin to intercept stdout
Justification
-
💎 This module wrapsintercept-stdout
as the form of the Next.js plugin. - 🙋🏽 Why wrap this module?
- I didn't want to call a function separate from other
NextConfig
values and plugins. It makes the action look suspicious and less coupled. - In addition,
intercept-stdout
was last distributed about six years ago, so it seemed necessary to cover the implementation separately in case it no longer works.
- I didn't want to call a function separate from other
Duplicate atom key
warnings for Recoil
Ignore // next.config.js
const withInterceptStdout = require('next-intercept-stdout');
module.exports = withInterceptStdout(
{
reactStrictMode: true,
},
(text) => (text.includes('Duplicate atom key') ? '' : text),
);
Usage with the
NextConfig
Object
// next.config.js
const withInterceptStdout = require('next-intercept-stdout');
const withSvgr = require('@newhighsco/next-plugin-svgr');
module.exports = withInterceptStdout(
withSvgr({
reactStrictMode: true,
svgrOptions: {},
}),
(text) => (text.includes('Duplicate atom key') ? '' : text),
);
Usage with other Next.js plugins