Skip to content

Commit

Permalink
fix(gui): disable react profiling in default bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Jan 13, 2023
1 parent f9bcc5d commit 1bb0a3a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
17 changes: 11 additions & 6 deletions gui/esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@ import { build } from 'esbuild';
import { join } from 'path';
import alias from 'esbuild-plugin-alias';

const debug = process.env['DEBUG'] === 'TRUE'
const root = process.cwd();

const plugins = [];

if (debug) {
plugins.push(alias({
'react-dom$': 'react-dom/profiling',
'scheduler/tracing': 'scheduler/tracing-profiling',
}));
}

build({
bundle: true,
define: {
Expand All @@ -15,11 +25,6 @@ build({
keepNames: true,
outdir: 'out/bundle/',
platform: 'browser',
plugins: [
alias({
'react-dom$': 'react-dom/profiling',
'scheduler/tracing': 'scheduler/tracing-profiling',
})
],
plugins,
sourcemap: true,
}).catch(() => process.exit(1));
1 change: 1 addition & 0 deletions onnx-web.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"Heun",
"huggingface",
"Inpaint",
"inpainting",
"jsonify",
"Karras",
"KDPM",
Expand Down

0 comments on commit 1bb0a3a

Please sign in to comment.