Home > @lynx-js/rspeedy > Filename > bundle
Filename.bundle property
The name of the bundle files.
Signature:
bundle?: string | undefined;
Default values:
'[name].[platform].bundle'
The following placeholder is supported:
[name]
: the name of the entry. - [contenthash]
: the contenthash of the bundle. - [platform]
: the environment name of the bundle.
Example 1
- Using content hash in bundle filename:
import { defineConfig } from '@lynx-js/rspeedy'
export default defineConfig({
output: {
filename: {
bundle: '[name].[contenthash].bundle',
},
},
})
Example 2
- Using content hash with length in bundle filename:
import { defineConfig } from '@lynx-js/rspeedy'
export default defineConfig({
output: {
filename: {
bundle: '[name].[contenthash:8].bundle',
},
},
})