For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt, and this page is available as Markdown at /next/zh/api/build/output/filename/template.md.
Lynx
  • 简体中文
  • output.filename.template

    optional template?: string

    仅适用于 Rspeedy

    此配置仅由 Rspeedy 的 lynx.config.ts 接受,Rsbuild + pluginLynx 不支持。请勿直接写入 rsbuild.config.ts,也不要传给 pluginLynx()。

    模板文件的名称。

    已被弃用

    请使用 Filename.bundle 代替。

    默认值

    '[name].[platform].bundle'

    备注

    支持以下占位符:

    • [name]:入口名称。
    • [contenthash]:模板的 contenthash。

    示例

    • 在 bundle 文件名中使用 content hash:
    import { defineConfig } from '@lynx-js/rspeedy'
    
    export default defineConfig({
      output: {
        filename: {
          template: '[name].[contenthash].bundle',
        },
      },
    })
    • 在 bundle 文件名中使用指定长度的 content hash:
    import { defineConfig } from '@lynx-js/rspeedy'
    
    export default defineConfig({
      output: {
        filename: {
          template: '[name].[contenthash:8].bundle',
        },
      },
    })
    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。