From 05bfcc0908031569a06044a63079053677a05448 Mon Sep 17 00:00:00 2001 From: Kieron Taylor Date: Wed, 13 Mar 2024 10:10:44 +0000 Subject: [PATCH] Fix the way vite runs in dev mode so that browser tools work --- frontend/Dockerfile | 2 +- frontend/package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 1e777afc..7cd84b37 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -27,4 +27,4 @@ COPY ./vite.config.js /code/longue_vue/vite.config.js COPY ./index.html /code/longue_vue/index.html COPY ./.env /code/longue_vue/.env -CMD ["npm", "exec", "vite", "--", "--host", "--port", "80", "--base", "/ui/"] +CMD ["npm", "run", "dev", "--", "--host", "--port", "80", "--base", "/ui/"] diff --git a/frontend/package.json b/frontend/package.json index 1e1f1172..7617a3cb 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -9,9 +9,9 @@ "npm": ">=8.11.0" }, "scripts": { - "dev": "vite --port 3000", + "dev": "vite --port 80 --mode development", "build": "vite build", - "preview": "vite preview --port 3000", + "preview": "vite preview --port 80", "test": "vitest run", "coverage": "vitest run --coverage", "test:e2e:ci": "start-server-and-test preview http://localhost:3000/ 'cypress run --e2e'",