@@ -7,7 +7,7 @@ import * as ipc from "../../../typings/ipc"
77import { Emitter } from "../../common/emitter"
88import { HttpCode , HttpError } from "../../common/http"
99import { getFirstString } from "../../common/util"
10- import { commit , rootPath , version } from "../constants"
10+ import { isDevMode , rootPath , version } from "../constants"
1111import { authenticated , ensureAuthenticated , redirect , replaceTemplates } from "../http"
1212import { getMediaMime , pathToFsPath } from "../util"
1313import { VscodeProvider } from "../vscode"
@@ -31,7 +31,7 @@ router.get("/", async (req, res) => {
3131 try {
3232 return await vscode . initialize ( { args : req . args , remoteAuthority : req . headers . host || "" } , req . query )
3333 } catch ( error ) {
34- const devMessage = commit === "development" ? "It might not have finished compiling." : ""
34+ const devMessage = isDevMode ? "It might not have finished compiling." : ""
3535 throw new Error ( `VS Code failed to load. ${ devMessage } ${ error . message } ` )
3636 }
3737 } ) ( ) ,
@@ -44,7 +44,7 @@ router.get("/", async (req, res) => {
4444 req ,
4545 // Uncomment prod blocks if not in development. TODO: Would this be
4646 // 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 ,
4848 {
4949 authed : req . args . auth !== "none" ,
5050 disableTelemetry : ! ! req . args [ "disable-telemetry" ] ,
0 commit comments