diff --git a/plugins/pbjsGlobals.js b/plugins/pbjsGlobals.js index 6aa9ff57794..79dafd1e8b2 100644 --- a/plugins/pbjsGlobals.js +++ b/plugins/pbjsGlobals.js @@ -39,7 +39,7 @@ module.exports = function(api, options) { const modName = getModuleName(state.filename); if (modName != null) { // append "registration" of module file to $$PREBID_GLOBAL$$.installedModules - path.node.body.push(...api.parse(`window.${pbGlobal}.installedModules.push('${modName}');`, {filename: modName}).program.body); + path.node.body.push(...api.parse(`window.${pbGlobal}.installedModules.push('${modName}');`, {filename: state.filename}).program.body); } }, StringLiteral(path) {