From ac828e5aa44fefb363df0583377c19e1147cf2f7 Mon Sep 17 00:00:00 2001 From: Mike Date: Wed, 29 Jun 2022 13:12:48 -0400 Subject: [PATCH] OIA-40: Update plugin example with how to use dev env vars (#61) * add .env vars to allow plugins to target opennms * update sample plugin to work with env vars * add missing && --- ui-extension/.env.development | 3 +++ ui-extension/package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 ui-extension/.env.development diff --git a/ui-extension/.env.development b/ui-extension/.env.development new file mode 100644 index 00000000..65375191 --- /dev/null +++ b/ui-extension/.env.development @@ -0,0 +1,3 @@ +VITE_BASE_V2_URL=http://localhost:8980/opennms/api/v2 +VITE_BASE_REST_URL=http://localhost:8980/opennms/rest +VITE_BASE_URL=http://localhost:8980 diff --git a/ui-extension/package.json b/ui-extension/package.json index e272e6c8..2923159c 100644 --- a/ui-extension/package.json +++ b/ui-extension/package.json @@ -15,7 +15,7 @@ "scripts": { "dev": "vite --config vite.config.dev.ts", "build": "vue-tsc --noEmit && vite build", - "preview": "vite preview --port 5002" + "preview": "vite build --mode development && vite preview --port 5002" }, "dependencies": { "pinia": "^2.0.14",