-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Description of Proposed Feature
It should be possible for AMD modules to access their URI as with requireJS (see doc).
The implementation would be quite simple:
https://github.com/systemjs/systemjs/blob/main/src/extras/amd.js#L43
return [amdDefineDeps, function (_export, _context) {
// expose the url
module.uri = _context.meta.url;
_export({ default: exports, __useDefault: true });
return {....}In the client code:
define(['module'], (module) => {
console.log(module.uri)
})In what way would you use it?
The idea is to also allow AMD modules to resolve their path and load their own assets.
This was at some point briefly mentioned in #1939.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels