mirror of
https://github.com/WGDashboard/WGDashboard-PRW.git
synced 2026-12-01 08:57:40 +00:00
chore: fix client reference error
This commit is contained in:
@@ -26,6 +26,4 @@ coverage
|
|||||||
*.sln
|
*.sln
|
||||||
*.sw?
|
*.sw?
|
||||||
|
|
||||||
*.tsbuildinfo
|
*.tsbuildinfo
|
||||||
|
|
||||||
proxy.js
|
|
||||||
@@ -22,6 +22,16 @@ npm install
|
|||||||
npm run dev
|
npm run dev
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The development server forwards `/client` requests to `http://wg.local:10086/`.
|
||||||
|
The target is configured in the tracked [proxy.js](./proxy.js) module, which must
|
||||||
|
be present even when running tests or production builds.
|
||||||
|
|
||||||
|
### Run Unit Tests
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm test
|
||||||
|
```
|
||||||
|
|
||||||
### Compile and Minify for Production
|
### Compile and Minify for Production
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
export const proxy = "http://wg.local:10086/";
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import { describe, expect, it } from "vitest";
|
||||||
|
|
||||||
|
import config from "./vite.config.js";
|
||||||
|
import { proxy } from "./proxy.js";
|
||||||
|
|
||||||
|
describe("Vite configuration", () => {
|
||||||
|
it("loads the client development proxy configuration", () => {
|
||||||
|
expect(proxy).toBe("http://wg.local:10086/");
|
||||||
|
expect(config.server.proxy["/client"]).toBe(proxy);
|
||||||
|
});
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user