if (__DEV__) {
  const global = (1, eval)("this");
  const key = "__react_router_build__";
  const buildNames = { cjs: "CommonJS", esm: "ES modules", umd: "UMD" };

  if (global[key] && global[key] !== process.env.BUILD_FORMAT) {
    const initialBuildName = buildNames[global[key]];
    const secondaryBuildName = buildNames[process.env.BUILD_FORMAT];

    // TODO: Add link to article that explains in detail how to avoid
    // loading 2 different builds.
    throw new Error(
      `You are loading the ${secondaryBuildName} build of React Router ` +
        `on a page that is already running the ${initialBuildName} ` +
        `build, so things won't work right.`
    );
  }

  global[key] = process.env.BUILD_FORMAT;
}

export { default as MemoryRouter } from "./MemoryRouter";
export { default as Prompt } from "./Prompt";
export { default as Redirect } from "./Redirect";
export { default as Route } from "./Route";
export { default as Router } from "./Router";
export { default as StaticRouter } from "./StaticRouter";
export { default as Switch } from "./Switch";
export { default as generatePath } from "./generatePath";
export { default as matchPath } from "./matchPath";
export { default as withRouter } from "./withRouter";

export { default as __RouterContext } from "./RouterContext";

@@ -14,42 +14,74 @@
 %7B%0A  
-const global = (1, eval)(%22this%22);%0A
+if (typeof window !== %22undefined%22) %7B%0A    const global = window;%0A  
   co
@@ -118,16 +118,18 @@
 d__%22;%0A  
+ 
+ 
 const bu
@@ -192,16 +192,18 @@
 MD%22 %7D;%0A%0A
+  
   if (gl
@@ -259,24 +259,26 @@
 RMAT) %7B%0A    
+  
 const initia
@@ -315,24 +315,26 @@
 %5Bkey%5D%5D;%0A    
+ 
+ 
 const second
@@ -387,16 +387,18 @@
 RMAT%5D;%0A%0A
+  
     // T
@@ -463,16 +463,18 @@
 oid%0A    
+  
 // loadi
@@ -500,16 +500,18 @@
 ds.%0A    
+ 
+ 
 throw ne
@@ -519,16 +519,18 @@
  Error(%0A
+  
       %60Y
@@ -604,16 +604,18 @@
         
+  
 %60on a pa
@@ -677,16 +677,18 @@
         
+ 
+ 
 %60build, 
@@ -724,18 +724,24 @@
     
+  
 );%0A  
+ 
+ 
 %7D%0A%0A  
+ 
+ 
 glob
@@ -776,16 +776,20 @@
 FORMAT;%0A
+  %7D%0A
 %7D%0A%0Aexpor

Remove use of eval in dev