Skip to content

Download page: add "Use Prebid.js as an npm dependency" - #6860

Merged
muuki88 merged 2 commits into
prebid:masterfrom
patmmccann:agent-npm-consumer-docs
Oct 28, 2026
Merged

muuki88 merged 2 commits into
prebid:masterfrom
patmmccann:agent-npm-consumer-docs

Conversation

@patmmccann

Copy link
Copy Markdown
Collaborator

Companion to prebid/Prebid.js#15853, which documents bundling Prebid.js from npm with webpack + SWC and with Bun in the Prebid.js README. Related: prebid/Prebid.js#10086.

docs.prebid.org had no page about using Prebid.js as an npm dependency. The download page offers "Option 1" (download) and "Option 2: Build from Source Code", so this adds "Option 3: Use Prebid.js as an npm Dependency" with:

  • npm install prebid.js and an example entry file. It shows that modules are chosen by importing them, by their names in modules/, instead of --modules or the checkboxes.
  • That since 10 the package is precompiled, so it works with any bundler or compiler (webpack, SWC, Bun, Rollup, Vite) without Babel or Prebid-specific configuration.
  • That submodules need their parent module imported (ID systems, RTD providers, FPD and video submodules). The download page and gulp build add these automatically, but npm imports don't. Build: NPM submodule imports pull in their parent module Prebid.js#15854 makes npm imports add parents too; once it ships, this bullet can say so.
  • Build options, via the webpack loader or the Rollup/Vite plugin.
  • A link to the README's npm usage section for the full webpack + SWC and Bun examples.

The example entry file is the one that was built and run in headless Chrome for #15853.

markdownlint-cli2 0.22.1 passes. It merges cleanly with #6842 and #6845, which also edit download.md.

🤖 Generated with Claude Code

Companion to prebid/Prebid.js#15853: explain installing Prebid.js from
npm, choosing modules by importing them (including parent modules for
submodules), that 10+ works with any bundler without Babel, and link the
README's webpack + SWC and Bun examples.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-23T16:51:20.637739Z 63acaec PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@netlify

netlify Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for prebid-docs-preview ready!

Name Link
🔨 Latest commit a9d7fe7
🔍 Latest deploy log https://app.netlify.com/projects/prebid-docs-preview/deploys/6adb91c99151c542b21e3138
😎 Deploy Preview https://deploy-preview-6860--prebid-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@muuki88
muuki88 merged commit 124c07c into prebid:master Oct 28, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants