We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Bug
When passing modules via the require.cache() API, it does not work as expected.
require.cache()
Code
require.cache({ 'some/module/mid': () => { define('some/module/mid', [ 'dependency' ], (dependency) => { /* module */ } }); require([ 'some/module/mid' ], (someModule) => { /* stuff */ };
Expected behavior:
This should run without issue.
Actual behavior:
The loader will report it cannot load some/module/mid. In order to make it available, you have to do something like this:
some/module/mid
require.cache({ 'some/module/mid': () => { define('some/module/mid', [ 'dependency' ], (dependency) => { /* module */ } }); require.cache({}); require([ 'some/module/mid' ], (someModule) => { /* stuff */ };
Which will cause the loader to actually consume the provided cached modules.
I suspect this is mainly because there are not tests around the .cache() API that this is why this is undetected.
.cache()
The text was updated successfully, but these errors were encountered:
Adding to cache as soon as require.cache is called instead of pending…
dde74b9
… it for later, issue dojo#124
1d4a69f
Adding to cache as soon as require.cache is called instead of pending… (
d6f18f8
#129) * Adding to cache as soon as require.cache is called instead of pending it for later, issue #124 * Removing unused code
rorticus
No branches or pull requests
Bug
When passing modules via the
require.cache()
API, it does not work as expected.Code
Expected behavior:
This should run without issue.
Actual behavior:
The loader will report it cannot load
some/module/mid
. In order to make it available, you have todo something like this:
Which will cause the loader to actually consume the provided cached modules.
I suspect this is mainly because there are not tests around the
.cache()
API that this is why this is undetected.The text was updated successfully, but these errors were encountered: