Record<string, unknown>
{}
Replaces variables in your code with other values or expressions at compile time. This is useful for enabling different behavior between development and production builds.
Each key passed into the configuration is an identifier or multiple identifiers joined with .
.
typeof
to the key, it is only defined for typeof calls.For more usage, please refer to Using define and Rspack - DefinePlugin.
Expressions will be replaced with the corresponding code fragments: