Skip to content

Commit 83810ea

Browse files
committed
guard Debug Panel with process.env.NODE_ENV
1 parent 1e1c7fa commit 83810ea

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

rollup.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const minifiedPlugins = [
4444
svelte({ extensions: ['.svelte'] }),
4545
commonjs(),
4646
replace({
47+
exclude: 'src/**',
4748
'process.env.NODE_ENV': JSON.stringify('production'),
4849
}),
4950
filesize(),

src/client/client.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,11 @@ class _ClientImpl {
314314
}
315315

316316
mount() {
317-
if (this.debug !== false && this._debugPanel == null) {
317+
if (
318+
process.env.NODE_ENV !== 'production' &&
319+
this.debug !== false &&
320+
this._debugPanel == null
321+
) {
318322
let target = document.body;
319323
if (this.debug && this.debug.target) {
320324
target = this.debug.target;

0 commit comments

Comments
 (0)