undefinedAt build time, prevent some import dependencies from being packed into bundles in your code, and instead fetch them externally at runtime.
For more information, please see: Rspack Externals.
Exclude the react-dom dependency from the output bundle. To get this module at runtime, the value of react-dom will globally retrieve the ReactDOM variable.
If output.target is web-worker, externals will not take effect. This is because the Web Worker environment cannot access global variables.