Prebidexternal first-party bundle loading#743
Open
ChristianPavilonis wants to merge 4 commits into
Open
Conversation
|
|
||
| Client-side bidders need their Prebid.js adapter modules bundled in the JS output. This is controlled by the `TSJS_PREBID_ADAPTERS` environment variable at build time: | ||
| Client-side bidders need their Prebid.js adapter modules included in the generated external bundle: | ||
|
|
Collaborator
Author
There was a problem hiding this comment.
The bundling should be moved to CLI when ready.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bundle_mode, no embedded/deferredtsjs-prebidloading, andexternal_bundle_urlis required whenever Prebid is enabled./integrations/prebid/bundle.jsscript and keep publisher Prebid script interception/removal to prevent duplicate instances.proxy.allowed_domainsenforcement.external_bundle_sha256optional; when present it drives versioned first-party URLs, immutable cache headers, andsha256:ETags. SRI is validated if configured but is not required.build-prebid-external.mjs.Quick how-to: generate and configure a Prebid bundle
cd crates/js/lib npm run build:prebid-external -- \ --adapters=rubicon,appnexus,openx \ --user-id-modules=sharedIdSystem,uid2IdSystem \ --out=dist/prebidUpload the generated
trusted-prebid-<sha256>.jsfromdist/prebid/to an HTTPS asset host that is allowed byproxy.allowed_domains.Copy values from
dist/prebid/manifest.jsoninto config:Trusted Server injects the same-origin
/integrations/prebid/bundle.jsroute for browsers; publishers should not reference the external asset URL directly in page markup.Testing
cargo fmt --all -- --checkTSJS_SKIP_BUILD=1 cargo check -p trusted-server-coreTSJS_SKIP_BUILD=1 cargo test -p trusted-server-core prebid --libTSJS_SKIP_BUILD=1 cargo test -p trusted-server-core publisher::tests --libTSJS_SKIP_BUILD=1 cargo test -p trusted-server-core registry::tests --libTSJS_SKIP_BUILD=1 cargo test --workspaceTSJS_SKIP_BUILD=1 cargo clippy --workspace --all-targets --all-features -- -D warningscargo check -p trusted-server-jscd crates/js/lib && npm run buildcd crates/js/lib && npm run formatcd crates/js/lib && npx vitest runcd crates/js/lib && npm run build:prebid-external -- --adapters=rubicon --user-id-modules=sharedIdSystem --out=/tmp/trusted-server-prebid-external-hard-cutovercd docs && npm ci && npm run format