Skip to content

Commit 73311dc

Browse files
committed
add function to create plugin to control inclusion of debug logging
1 parent 3df1298 commit 73311dc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

rollup.config.js

+11
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,17 @@ function makeLicensePlugin(title) {
4646
});
4747
}
4848

49+
function makeIsDebugBuildPlugin(includeDebugging) {
50+
return replace({
51+
// don't turn `const __SENTRY_DEBUG__ = false` into `const false = false`
52+
preventAssignment: true,
53+
// everywhere else, replace it with the value of `includeDebugging`
54+
values: {
55+
__SENTRY_DEBUG__: includeDebugging,
56+
},
57+
});
58+
}
59+
4960
export const terserPlugin = terser({
5061
mangle: {
5162
// captureExceptions and captureMessage are public API methods and they don't need to be listed here

0 commit comments

Comments
 (0)