Skip to content

Commit 0dc1ea5

Browse files
committed
frontend: add make webserve task for testing
For testing purpose sometimes we want to test the actual prodution build instead of vite dev mode. This first builds the frontend and serves without hot reloading.
1 parent 9a79804 commit 0dc1ea5

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ webtest:
5353
cd ${WEBROOT} && $(MAKE) jstest
5454
webtestwatch:
5555
cd ${WEBROOT} && $(MAKE) jstest-watch
56+
webserve:
57+
cd ${WEBROOT} && $(MAKE) serve
5658
qt-linux: # run inside dockerdev
5759
$(MAKE) buildweb
5860
cd frontends/qt && $(MAKE) linux

frontends/web/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ jstest-cover:
2828
listdeps:
2929
@echo "Listing JavaScript production dependencies. Be careful to not pull in many deps accidentally."
3030
npm list -prod -long
31+
serve:
32+
npm run serve

frontends/web/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"lint-debug": "eslint ./src --inspect-config",
5555
"typescript": "tsc -p tsconfig.json",
5656
"test": "vitest",
57-
"preview": "vite preview --port 8080"
57+
"preview": "vite preview --port 8080",
58+
"serve": "npm run build && npm run preview"
5859
}
5960
}

0 commit comments

Comments
 (0)