In v4, everything has changed internally.
With version 4.0.0-next.16
, performance has improved approximately 6 times compared to previous versions, allowing it to handle three times more requests.
Note: There was a significant performance drop when updating from 2.0 to 3.0, but this issue has been resolved with the 4.0 update, making it even faster.
INFO
Pkg | Latency | Requests/Sec | Bytes/Sec |
---|---|---|---|
4.0.0-next.19:serpack-on | 0.03 ms | 18K | 2.3 MB |
4.0.0-next.9:serpack-on | 0.03 ms | 17.5K | 2.23 MB |
3.0.0 | 1.18 ms | 5.9K | 774.47 KB |
2.0.0-next.24 | 0.23 ms | 11.4K | 1.45 MB |
1.0.0 | 0.04 ms | 17.7K | 2.26 MB |
In the existing zely, esbuild was used as the default loader.
Although esbuild is still the default loader, zely introduced a new loader serpack based on swc.
It will increase the expandability of zely in the future.
zely dev --serpack
Serpack is less performant than esbuild (but it still fast!), it has the advantage of being optimized for zely.
WARNING
This compiler is under development. The sourcemap and circular dependency issues are still not resolved.
Server build feature added!
You can bundle multiple typescript pages into one JavaScript File.
auto importing feature isn't supported.
Refer: Build Server
No more writing code during server development, such as creating separate JavaScript files to check if it works properly.
$ zely request
▸ baseURL: http://localhost:3001
[12:31:35 AM] info checking server... (requesting /)
GET> /
200 {"msg":"Hello","name":""}
GET>
Set header or method using JavaScript code in input prompt.
GET> config1 = { method: "POST", headers: { }, body: { name: "Cat" } }
GET> set(config1)
POST(config1)> /greeting
200 Hello, Cat!
TIP
Declare variables without declaration statements such as const
or let
.
The new HTML loader goes through a compilation step instead of just passing the original HTML file, which increases responsiveness. - learn more
To use HTML loader, enable experimental.useHTML
.
import { defineConfig } from 'zely';
export default defineConfig({
experimental: {
useHTML: true,
},
});
INFO
Example: simple counter
The CLI utility animaux has been updated!
The new version is more stable and TypeScript friendly.
4 packages have been integrated into the main module.