For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/rspeedy/rspeedy.filename.template.md.
Rspeedy logo
Rspeedy
  • English
  • Home > @lynx-js/rspeedy > Filename > template

    Filename.template property

    Warning: This API is now obsolete.

    Use Filename.bundle instead.

    The name of the template files.

    Signature:

    template?: string | undefined;

    Default Value

    '[name].[platform].bundle'

    Remarks

    The following placeholder is supported:

    • [name]: the name of the entry. - [contenthash]: the contenthash of the template.

    Example 1

    • Using content hash in bundle filename:
    import { defineConfig } from '@lynx-js/rspeedy'
    
    export default defineConfig({
      output: {
        filename: {
          template: '[name].[contenthash].bundle',
        },
      },
    })

    Example 2

    • Using content hash with length in bundle filename:
    import { defineConfig } from '@lynx-js/rspeedy'
    
    export default defineConfig({
      output: {
        filename: {
          template: '[name].[contenthash:8].bundle',
        },
      },
    })
    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.