const serverRenderPaths =["/docs","/dashboard"] if(!serverRenderPaths.includes(window.location.pathname)) { ReactDom.createRoot(document.getElementById("root")).render( <App>); }
By this way you can exclude particular routes