diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-07-11 01:54:08 +1000 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-07-11 01:54:08 +1000 |
| commit | 5fe71ea7b9d9a5d2dc6e8e5ce5b9193629eed74d (patch) | |
| tree | 3b8b9d7299540a812ec93e224f8fc71249a98860 /src | |
| parent | a8f80a02b88055cfcb45664ce3a3d24c2b2da98c (diff) | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib.ts | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |
