How to remove the next js and react js version in the build for the security reasons i don’t wanted display the version
i have tried this one which is not working
import TerserPlugin from "terser-webpack-plugin";
import WebpackObfuscator from "webpack-obfuscator";
/\*\* @type {import('next').NextConfig} \*/
const nextConfig = {
reactStrictMode: true,
poweredByHeader: false,
productionBrowserSourceMaps: false,
output: "export",
trailingSlash: true,
webpack(config, { isServer }) {
if (!isServer) {
if (config.optimization && config.optimization.minimizer) {
config.optimization.minimizer.push(
new TerserPlugin({
terserOptions: {
compress: {
drop_console: true,
drop_debugger: true,
},
output: {
comments: false,
},
},
})
);
}
config.plugins.push(
new WebpackObfuscator(
{
rotateStringArray: true,
stringArray: true,
stringArrayThreshold: 0.75,
debugProtection: false,
disableConsoleOutput: true,
},
\[\]
)
);
}
return config;
},
};
export default nextConfig;