dojo/loader

require.undef() recursive undefined `require`, `module` and `exports`

kitsonk opened this issue · 0 comments

Bug

Using require.undef() with the recursive flag un-defines some fundamental modules that shouldn't be undefined.

Code

require.undef('some/mid', true);

define([ 'require', 'module', 'exports' ], (require, module, exports) => { /* ... */ });

Expected behavior:

Works without error.

Actual behavior:

Receive errors about "unable to load module require from parent..."