Interface: LynxConfig
Beta
The Lynx config that pluginLynx exposes to other plugins.
Remarks
The data mirrors LynxPluginOptions, so a plugin reads
config.output.filename the same way it reads output.filename from
api.getRsbuildConfig(). Values that depend on the entry being built are
derived by the methods, which travel with the data so that the plugin that
built the config is always the one that resolves it.
Example
Properties
output
readonlyoutput:LynxOutput
Beta
The build outputs.
performance
readonlyperformance:LynxPerformance
Beta
The performance options.
Methods
resolveBundleFilename()
resolveBundleFilename(
context:object):string
Beta
Resolve the name of the bundle file of an entry.
Parameters
Returns
string
resolveIntermediateDir()
resolveIntermediateDir(
context?:object):string
Beta
Resolve the directory of the intermediate files.
Parameters
Returns
string
Remarks
A Lynx bundle is encoded from per-thread JS, CSS and HMR outputs. They are emitted into this directory, per entry, instead of next to the bundle.
resolveLazyBundleFilename()
resolveLazyBundleFilename(
context:object):string|undefined
Beta
Resolve the name of the lazy bundle files.
Parameters
Returns
string | undefined
The resolved name, or undefined when LynxFilename.bundle
is not a function. A lazy bundle name can only be customized by a function,
since it is resolved per async chunk, so undefined means the caller
leaves the name to LynxTemplatePlugin.
Remarks
There is no entry name to resolve [name] with, so the placeholder is
kept for LynxTemplatePlugin to fill in per async chunk.