diff --git a/.env_example b/.env_example index 14cf19f09..30f18e874 100644 --- a/.env_example +++ b/.env_example @@ -25,3 +25,7 @@ ENABLE_MINIFY=true # templates are served via the normal method from the server's python site # packages. DISABLE_TEMPLATES_PROXY=false + +# If playwright tests are being run via vite dev server, Vue plugins will +# invalidate screenshots. When `true`, vite plugins will not be loaded. +DISABLE_VUE_PLUGINS=false diff --git a/vite.config.mts b/vite.config.mts index 44e2c6832..2fb2864b3 100644 --- a/vite.config.mts +++ b/vite.config.mts @@ -21,6 +21,7 @@ const SHOULD_MINIFY = process.env.ENABLE_MINIFY === 'true' // vite dev server will listen on all addresses, including LAN and public addresses const VITE_REMOTE_DEV = process.env.VITE_REMOTE_DEV === 'true' const DISABLE_TEMPLATES_PROXY = process.env.DISABLE_TEMPLATES_PROXY === 'true' +const DISABLE_VUE_PLUGINS = process.env.DISABLE_VUE_PLUGINS === 'true' const DEV_SERVER_COMFYUI_URL = process.env.DEV_SERVER_COMFYUI_URL || 'http://127.0.0.1:8188' @@ -71,9 +72,9 @@ export default defineConfig({ }, plugins: [ - vueDevTools(), - vue(), - createHtmlPlugin({}), + ...(!DISABLE_VUE_PLUGINS + ? [vueDevTools(), vue(), createHtmlPlugin({})] + : [vue()]), comfyAPIPlugin(IS_DEV), generateImportMapPlugin([ { name: 'vue', pattern: /[\\/]node_modules[\\/]vue[\\/]/ },