@@ -7,7 +7,7 @@ import * as ipc from "../../../typings/ipc"
7
7
import { Emitter } from "../../common/emitter"
8
8
import { HttpCode , HttpError } from "../../common/http"
9
9
import { getFirstString } from "../../common/util"
10
- import { commit , rootPath , version } from "../constants"
10
+ import { isDevMode , rootPath , version } from "../constants"
11
11
import { authenticated , ensureAuthenticated , redirect , replaceTemplates } from "../http"
12
12
import { getMediaMime , pathToFsPath } from "../util"
13
13
import { VscodeProvider } from "../vscode"
@@ -31,7 +31,7 @@ router.get("/", async (req, res) => {
31
31
try {
32
32
return await vscode . initialize ( { args : req . args , remoteAuthority : req . headers . host || "" } , req . query )
33
33
} catch ( error ) {
34
- const devMessage = commit === "development" ? "It might not have finished compiling." : ""
34
+ const devMessage = isDevMode ? "It might not have finished compiling." : ""
35
35
throw new Error ( `VS Code failed to load. ${ devMessage } ${ error . message } ` )
36
36
}
37
37
} ) ( ) ,
@@ -44,7 +44,7 @@ router.get("/", async (req, res) => {
44
44
req ,
45
45
// Uncomment prod blocks if not in development. TODO: Would this be
46
46
// better as a build step? Or maintain two HTML files again?
47
- commit !== "development" ? content . replace ( / < ! - - P R O D _ O N L Y / g, "" ) . replace ( / E N D _ P R O D _ O N L Y - - > / g, "" ) : content ,
47
+ ! isDevMode ? content . replace ( / < ! - - P R O D _ O N L Y / g, "" ) . replace ( / E N D _ P R O D _ O N L Y - - > / g, "" ) : content ,
48
48
{
49
49
authed : req . args . auth !== "none" ,
50
50
disableTelemetry : ! ! req . args [ "disable-telemetry" ] ,
0 commit comments