From 6d193d84782ec99a2fe4d6cb9a5434f90ae425b4 Mon Sep 17 00:00:00 2001 From: JamieScottC Date: Wed, 1 Nov 2023 18:43:45 -0400 Subject: [PATCH] check if dist directory exists when starting dev server --- server.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server.py b/server.py index e5998f6ad..9c64357ec 100644 --- a/server.py +++ b/server.py @@ -166,6 +166,10 @@ def list_str(values): app_svc.register_subapp('/api/v2', app.api.v2.make_app(app_svc.get_services())) init_swagger_documentation(app_svc.application) if (args.uiDevHost): + if not os.path.exists("./plugins/magma/dist"): + logging.info("Building VueJS front-end.") + subprocess.run(['npm', 'run', 'build'], cwd='plugins/magma', check=True) + logging.info("VueJS front-end build complete.") app_svc.application.on_response_prepare.append(enable_cors) if (args.build):