Skip to content

Commit

Permalink
feat(amd): support module.uri
Browse files Browse the repository at this point in the history
  • Loading branch information
jackw committed Apr 18, 2024
1 parent 3a5f73f commit 6979a11
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/extras/amd.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ import { errMsg } from '../err-msg.js';
if (splice)
amdDefineDeps.length -= splice;
var amdExec = amdDefineExec;
return [amdDefineDeps, function (_export) {
return [amdDefineDeps, function (_export, _context) {
_export({ default: exports, __useDefault: true });
return {
setters: setters,
execute: function () {
module.uri = _context.meta.url;
var amdResult = amdExec.apply(exports, depModules);
if (amdResult !== undefined)
module.exports = amdResult;
Expand Down

0 comments on commit 6979a11

Please sign in to comment.