FAQ

已解决

background-attachment: fixed iOS 不支持

iOS has an issue preventing background-attachment: fixed from being used with background-size: cover. The Fixed Background Attachment Hack | CSS Tricks

改为使用 ::before 伪元素实现。

JavaScript heap out of memory

During SSG build (valaxy build --ssg), vite-ssg runs client build, server build, and page rendering in the same process. The Vite resolved config and plugin system from the build phase remain in memory, leaving limited heap space for the rendering phase.

Minimum memory requirement: --max-old-space-size=2304 (~2.3 GB)

bash
# Reproduce tests
pnpm test:space        # demo/yun
pnpm test:space:docs   # docs

Valaxy automatically adjusts SSG behavior based on V8’s heap_size_limit:

Heap Limitbeasties (Critical CSS)HTML minifyConcurrency
≤ 2.5 GBDisabledDisabled1
≤ 3.1 GBEnabledEnabled2
≤ 4.2 GBEnabledEnabled4
> 4.2 GBEnabledEnabled8+

If you encounter OOM in CI environments, increase the heap limit via NODE_OPTIONS:

bash
NODE_OPTIONS=--max-old-space-size=4096 pnpm build --ssg

合并

使用 defu

但实测 defu faster than @fastify/deepmerge

合并单个配置:

bash
# benchmark
@fastify/deepmerge x 605,343 ops/sec ±0.87% (96 runs sampled)
deepmerge x 20,312 ops/sec ±1.06% (92 runs sampled)
merge-deep x 83,167 ops/sec ±1.30% (94 runs sampled)
ts-deepmerge x 175,977 ops/sec ±0.57% (96 runs sampled)
deepmerge-ts x 174,973 ops/sec ±0.44% (93 runs sampled)
lodash.merge x 89,213 ops/sec ±0.70% (98 runs sampled)

To Be Continued.

Contributors