For AI agents: the complete documentation index is available at /zh/llms.txt, the full documentation bundle is available at /zh/llms-full.txt, and this page is available as Markdown at /zh/api/lynx-bundle-rslib-config.encodeoptions.hashsectionnames.md.
这是开发预览网站。请访问正式文档 lynx-stack.dev

Home > @lynx-js/lynx-bundle-rslib-config > EncodeOptions > hashSectionNames

EncodeOptions.hashSectionNames property

Append a short content hash to background custom section names and emit a__sectionMap custom section mapping each logical section name to its hashed name.

Signature:

hashSectionNames?: boolean;

Default Value

false

Remarks

Works around LynxGroup-scoped loadScript caching in lynx-core, which keys its cache only by (bundleName, sectionName) and can otherwise serve a stale background section after an in-place bundle update at the same URL.

Consuming applications resolve logical names vialynx.getCustomSectionSync('__sectionMap', bundleUrl) (supported automatically by @lynx-js/externals-loading-webpack-plugin). Older consumers that call lynx.loadScript(logicalName, ...) directly without reading __sectionMap will not find renamed sections.

Only takes effect for the 'lynx' target.