chore: Remove env variables in webpack bundle (#1353)
* chore: Remove env variables in webpack bundle * remove unused globals * refactor: consolidate window.env calls to single file * fix: Slack client side integration auth * fix: developers url
This commit is contained in:
@@ -10,9 +10,10 @@ import ScrollToTop from "components/ScrollToTop";
|
||||
import Toasts from "components/Toasts";
|
||||
import Theme from "components/Theme";
|
||||
import Routes from "./routes";
|
||||
import env from "env";
|
||||
|
||||
let DevTools;
|
||||
if (__DEV__) {
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
DevTools = require("mobx-react-devtools").default; // eslint-disable-line global-require
|
||||
}
|
||||
|
||||
@@ -44,7 +45,7 @@ if (element) {
|
||||
window.addEventListener("load", async () => {
|
||||
// installation does not use Google Analytics, or tracking is blocked on client
|
||||
// no point loading the rest of the analytics bundles
|
||||
if (!process.env.GOOGLE_ANALYTICS_ID || !window.ga) return;
|
||||
if (!env.GOOGLE_ANALYTICS_ID || !window.ga) return;
|
||||
|
||||
// https://github.com/googleanalytics/autotrack/issues/137#issuecomment-305890099
|
||||
await import("autotrack/autotrack.js");
|
||||
|
||||
Reference in New Issue
Block a user