Add programmatic consent API to @probo/cookie-banner
Expose a ConsentManager singleton via `@probo/cookie-banner/consent` (ESM) and `window.Probo.consent` (IIFE) so customers can check and react to consent state in their bundled JavaScript code, solving the problem of third-party SDKs initialized programmatically that cannot be blocked via data-cookie-consent attributes. Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -38,6 +38,12 @@ await Promise.all([
|
||||
outfile: "dist/cookie-banner-headless.mjs",
|
||||
format: "esm",
|
||||
}),
|
||||
esbuild.build({
|
||||
...shared,
|
||||
entryPoints: ["src/consent.ts"],
|
||||
outfile: "dist/cookie-banner-consent.mjs",
|
||||
format: "esm",
|
||||
}),
|
||||
esbuild.build({
|
||||
...shared,
|
||||
entryPoints: ["src/themed-banner/iife.ts"],
|
||||
|
||||
Reference in New Issue
Block a user