[Bug]: Invalid code generated when dll reference manifest contains moduleArgument: webpackModule,
#9094
Labels
bug
Something isn't working
System Info
Details
Bundle a dll containing a module that adds to the manifest
buildMeta.moduleArgument: "webpackModule"
.When a bundle is created that references that module the generated code looks like:
The first argument of the generated function is
__webpack_module__
, but the body of the code referencesmodule.exports =
. This causes a runtime error:Reproduce link
https://github.com/robrichard/rspack-dll-test/tree/webpack-module
Reproduce Steps
See the
webpack-module
branch of the above linked repoBuild with dll and dll reference plugin:
npm run build
Open
public/index.html
in a browser and see in the console:Generated code:
Note in "960", module.exports is referenced, while the module arg is
__webpack_module__
The text was updated successfully, but these errors were encountered: