What problem does this feature solve?
In my environment exists a global require function that is not called require. I would like to use this similar to the commonjs externalsType. Sadly, the function that that externals type uses is not customizable. I have not found any other method for doing this that does not cripple Rspack's optimization features, particularly module concatenation.
What does the proposed API of configuration look like?
Perhaps a new externalsRequire property or an extension to the current commonjs type such as commonjs(object.with.require) where the parameter object.with.require specifies a function accessible on the global. I am honestly uncertain of how best the configuration for this would be exposed and am open to suggestions.
What problem does this feature solve?
In my environment exists a global require function that is not called
require. I would like to use this similar to thecommonjsexternalsType. Sadly, the function that that externals type uses is not customizable. I have not found any other method for doing this that does not cripple Rspack's optimization features, particularly module concatenation.What does the proposed API of configuration look like?
Perhaps a new
externalsRequireproperty or an extension to the currentcommonjstype such ascommonjs(object.with.require)where the parameterobject.with.requirespecifies a function accessible on the global. I am honestly uncertain of how best the configuration for this would be exposed and am open to suggestions.