mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-08-18 09:14:09 +00:00
build: migrate build system to Vite and test runner to Vitest & Remove depracated husky usage (#2703)
- Replace Webpack with Vite for faster client bundling and HMR. - Migrate tests from Jest to Vitest and update configuration. - Update Web Worker instantiation to standard ESM syntax. - Implement Env utility in `src/core` for safe, hybrid environment variable access (Vite vs Node). - Refactor configuration loaders to remove direct `process.env` dependencies in shared code. - Update TypeScript environment definitions and project scripts for the new toolchain. - Remove the [depracated usage of the husky](https://github.com/typicode/husky/releases/tag/v9.0.1). ## Description: migrate build system to Vite and test runner to Vitest & Remove depracated husky usage ## Please complete the following: - [X] I have added screenshots for all UI updates - [X] I process any text displayed to the user through translateText() and I've added it to the en.json file - [ ] I have added relevant tests to the test directory - [X] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: wraith4081 --------- Co-authored-by: evanpelle <evanpelle@gmail.com>
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
jest.mock("lit", () => ({
|
||||
vi.mock("lit", () => ({
|
||||
html: () => {},
|
||||
LitElement: class {},
|
||||
}));
|
||||
|
||||
jest.mock("lit/decorators.js", () => ({
|
||||
vi.mock("lit/decorators.js", () => ({
|
||||
customElement: () => (clazz: any) => clazz,
|
||||
query: () => () => {},
|
||||
state: () => () => {},
|
||||
property: () => () => {},
|
||||
}));
|
||||
|
||||
jest.mock("lit/directive.js", () => ({
|
||||
vi.mock("lit/directive.js", () => ({
|
||||
DirectiveResult: class {},
|
||||
}));
|
||||
|
||||
jest.mock("lit/directives/unsafe-html.js", () => ({
|
||||
vi.mock("lit/directives/unsafe-html.js", () => ({
|
||||
unsafeHTML: () => {},
|
||||
UnsafeHTMLDirective: class {},
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user