Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
debug: Remove debug from globals.
Anders Kaseorg767ad1d90ec1
diff --git a/static/js/debug.js b/static/js/debug.jsindex 6b9a75c198d..086a94af9a3 100644--- a/static/js/debug.js+++ b/static/js/debug.js@@ -1,15 +1,8 @@/* eslint-disable no-console */-/* WARNING:-- This file is only included when Django's DEBUG = True and your- host is in INTERNAL_IPS.-- Do not commit any code elsewhere which uses these functions.- They are for debugging use only.-- The file may still be accessible under other circumstances, so do- not put sensitive information here. */+// This module is included from webpack in development mode. To access it from+// the browser console, run:+// var debug = require("./static/js/debug");/*debug.print_elapsed_time("foo", foo)diff --git a/tools/webpack.config.ts b/tools/webpack.config.tsindex 58bde4f359f..abd1e5ac603 100644--- a/tools/webpack.config.ts+++ b/tools/webpack.config.ts@@ -244,7 +244,6 @@ export default (env?: string): webpack.Configuration[] => {// Good error messages show up in production and development in the source mapsconst exposeOptions = [{path: "./debug-require.js", name: "require"},- {path: "../static/js/debug.js"},{path: "jquery/dist/jquery.js", name: ["$", "jQuery"]},];config.module!.rules.unshift(...getExposeLoaders(exposeOptions));@@ -252,7 +251,7 @@ export default (env?: string): webpack.Configuration[] => {if (!production) {// Out JS debugging toolsfor (const paths of Object.values(assets)) {- paths.push("./static/js/debug.js");+ paths.push("./static/js/debug");}config.devServer = {clientLogLevel: "error",