1
0
Fork 0

fix(gui): disable react profiling in default bundle

This commit is contained in:
Sean Sube 2023-01-12 18:18:51 -06:00
parent f9bcc5d4e4
commit 1bb0a3aed8
2 changed files with 12 additions and 6 deletions

View File

@ -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: {
@ -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));

View File

@ -22,6 +22,7 @@
"Heun",
"huggingface",
"Inpaint",
"inpainting",
"jsonify",
"Karras",
"KDPM",