Skip to content

Commit 47a6c6d

Browse files
authored
[Dev] Allow Vue dev tools to be disabled (#3911)
1 parent 068279e commit 47a6c6d

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.env_example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ ENABLE_MINIFY=true
2525
# templates are served via the normal method from the server's python site
2626
# packages.
2727
DISABLE_TEMPLATES_PROXY=false
28+
29+
# If playwright tests are being run via vite dev server, Vue plugins will
30+
# invalidate screenshots. When `true`, vite plugins will not be loaded.
31+
DISABLE_VUE_PLUGINS=false

vite.config.mts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const SHOULD_MINIFY = process.env.ENABLE_MINIFY === 'true'
2121
// vite dev server will listen on all addresses, including LAN and public addresses
2222
const VITE_REMOTE_DEV = process.env.VITE_REMOTE_DEV === 'true'
2323
const DISABLE_TEMPLATES_PROXY = process.env.DISABLE_TEMPLATES_PROXY === 'true'
24+
const DISABLE_VUE_PLUGINS = process.env.DISABLE_VUE_PLUGINS === 'true'
2425

2526
const DEV_SERVER_COMFYUI_URL =
2627
process.env.DEV_SERVER_COMFYUI_URL || 'http://127.0.0.1:8188'
@@ -71,9 +72,9 @@ export default defineConfig({
7172
},
7273

7374
plugins: [
74-
vueDevTools(),
75-
vue(),
76-
createHtmlPlugin({}),
75+
...(!DISABLE_VUE_PLUGINS
76+
? [vueDevTools(), vue(), createHtmlPlugin({})]
77+
: [vue()]),
7778
comfyAPIPlugin(IS_DEV),
7879
generateImportMapPlugin([
7980
{ name: 'vue', pattern: /[\\/]node_modules[\\/]vue[\\/]/ },

0 commit comments

Comments
 (0)