Home > @lynx-js/rspeedy > Filename > js
The name of the JavaScript files.
Signature:
js?: Rspack.Filename | undefined;
Default values:
'[name].js'
'[name].[contenthash:8].js'
import { defineConfig } from '@lynx-js/rspeedy' export default defineConfig({ output: { filename: { js: (pathData, assetInfo) => { console.log(pathData); // You can check the contents of pathData here if (pathData.chunk?.name === 'index') { return isProd ? '[name].[contenthash:8].js' : '[name].js'; } return '/some-path/[name].js'; }, }, }, })