-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Build sytem: allow customization of some build options (such as global name) to NPM consumers #13685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -31,6 +31,8 @@ import { _ADAGIO, getBestWindowForAdagio } from '../libraries/adagioUtils/adagio | |||
import { getGptSlotInfoForAdUnitCode } from '../libraries/gptUtils/gptUtils.js'; | |||
import { getBoundingClientRect } from '../libraries/boundingClientRect/boundingClientRect.js'; | |||
|
|||
import {getGlobalVarName} from '../src/buildOptions.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how is this different than
Prebid.js/modules/medianetBidAdapter.js
Line 23 in 7f61966
import {getGlobal} from '../src/prebidGlobal.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getGlobal
returns the global object (the one that has .requestBids()
etc); getGlobalVarName
returns the global name (e.g. 'pbjs'
).
Pull Request Test Coverage Report for Build 16577532621Details
💛 - Coveralls |
Type of change
Description of change
This reintroduces the ability for NPM consumers to customize some build options, namely
globalVarName
,defineGlobal
, anddistUrlBase
.The approach is:
$$PREBID_GLOBAL$$
, etc) with normal function calls;customize/webpackLoader.mjs
).Other information
Closes #13657