The issue was the way i was adding the section that will override the webpack settings was incorrect and also I neded to check the if (!isServer) condition
plugins: [
function customWebpackPlugin() {
return {
name: 'custom-webpack-plugin',
configureWebpack(config, isServer, utils) {
// Apply this configuration only for client-side builds
if (!isServer) {
return {
optimization: {
runtimeChunk: {
name: () => `runtime.main`, // Custom runtime file name
},
},
output: {
...config.output,
filename: 'assets/js/[name].[contenthash:8].js', // Custom path for main files
chunkFilename: 'assets/js/[name].[contenthash:8].chunk.js', // Custom path for chunk files
},
};
}
return {};
},
};
},
],
Once I added the above code to docusaurus.config.ts now its not adding the tilt
Thank you Bharat