ES2022 Output & whitespace-only minification (#201)

* Change vite output to ES2022

* Add whitespace-only minify using default esbuild

Does not work for .es.js output - limitation of vite.
Workaround for .es.js involves adding terser & a plugin.

* Remove @ts-expect-error from tests

* Update vite.config.mts

---------

Co-authored-by: Chenlei Hu <huchenlei@proton.me>
This commit is contained in:
filtered
2024-10-11 12:00:45 +11:00
committed by GitHub
parent 1ddb80d291
commit edfa5e70f2
3 changed files with 6 additions and 5 deletions

View File

@@ -5,9 +5,7 @@ import {
describe("LGraphNode", () => {
it("should serialize position correctly", () => {
const node = new LGraphNode("TestNode");
// @ts-expect-error Expected - not a TS class yet.
node.pos = [10, 10];
// @ts-expect-error JS tests in TS format
expect(node.pos).toEqual(new Float32Array([10, 10]));
expect(node.serialize().pos).toEqual(new Float32Array([10, 10]));
});