Closed kubijo closed 1 week ago
Hello @kubijo, sorry we can't investigate the problem further without reproduction demo, please provide a repro demo by forking rspack-repro, or provide a minimal GitHub repository by yourself. Issues labeled by need reproduction
will be closed if no activities in 14 days.
Run the build
script here https://github.com/kubijo/rspack-loader-undefined/commit/c87722ae72a0faac49b113c417a2da7238f31d4f
System Info
Details
The following error is thrown when a value of
undefined
is encountered where loader is expected. No validation error was ever thrown even though the docs mention that a strict validation is enabled by default.Please note that I know about incompatibility with Yarn's PNP algorithm, that is not the point of this report. The point is that the config consuming code should either filter out nil values or the validation code should shout at the user that they are supplying something fishy.
I had to go deep into the consuming code to add log-points and find out where I made a mistake (in my case, it was a forgotten reference to a loader object that I removed).
Reproduce link
No response
Reproduce Steps
Provide a config that includes an
undefined
value inmodule.rules
array and run a build.