File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change 11/**
2- * This module mostly exists for optimizations in the build process
3- * through rollup and terser. We define some global constants which
4- * are normally undefined. However terser overrides these with global
5- * definitions which can be evaluated by the static analyzer when
6- * creating a bundle.
7- *
8- * In turn the `isDebugBuild` and `isBrowserBundle` functions are pure
9- * and can help us remove unused code from the bundles.
2+ * This module exists for optimizations in the build process through rollup and terser. We define some global
3+ * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these
4+ * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will
5+ * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to
6+ * `logger` and preventing node-related code from appearing in browser bundles.
107 */
118
129declare const __SENTRY_BROWSER_BUNDLE__ : boolean | undefined ;
13- declare const __SENTRY_NO_DEBUG__ : boolean | undefined ;
10+
11+ const __SENTRY_DEBUG__ = true ;
1412
1513/**
1614 * Figures out if we're building with debug functionality.
1715 *
1816 * @returns true if this is a debug build
1917 */
2018export function isDebugBuild ( ) : boolean {
21- return typeof __SENTRY_NO_DEBUG__ !== 'undefined' && ! __SENTRY_BROWSER_BUNDLE__ ;
19+ return __SENTRY_DEBUG__ ;
2220}
2321
2422/**
You can’t perform that action at this time.
0 commit comments