From 5fe71ea7b9d9a5d2dc6e8e5ce5b9193629eed74d Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Mon, 11 Jul 2022 01:54:08 +1000 Subject: Make backend dev server script serve the image files Previously, image files in backend/data/img were moved to, or symlinked from, public/. This needed to be changed before each build, otherwise vite would end up copying gigabytes of images. --- src/lib.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/lib.ts b/src/lib.ts index d2ad959..c9570bc 100644 --- a/src/lib.ts +++ b/src/lib.ts @@ -7,11 +7,11 @@ import {LayoutOptions} from './layout'; import {getBreakpoint, Breakpoint, getScrollBarWidth, onTouchDevice} from './util'; // For server requests -const SERVER_URL = (new URL(window.location.href)).origin + '/data' -const SERVER_IMG_PATH = '/img/' +const SERVER_DATA_URL = (new URL(window.location.href)).origin + '/data/' +const SERVER_IMG_PATH = '/tolData/img/' export async function queryServer(params: URLSearchParams){ // Construct URL - let url = new URL(SERVER_URL); + let url = new URL(SERVER_DATA_URL); url.search = params.toString(); // Query server let responseObj; -- cgit v1.2.3