Skip to main content
We’ve released a new and improved web extension SDK under @sleek/web-ext-sdk, replacing the legacy @sleek/web-ext-coupon-sdk. This new SDK brings enhanced performance, additional capabilities, and a more extensible foundation for future features. If you’re currently using @sleek/web-ext-coupon-sdk, follow the guide below to migrate to @sleek/web-ext-sdk.

Summary of Key Changes

1. Update Your Dependency

Update your .npmrc if not already configured:
Replace the legacy SDK with the new one:

2. Update Static Script Inclusion

Old:
New:
Copy from:
Place them in your built extension root next to manifest.json.

3. Update Permissions

Ensure your manifest includes:
For MV3:

4. Update Initialization

Old:
New:

5. Update Event Handling

Old:
New:
If you plan to call getWebExtSdk() immediately after initialization, you must await the initializeWebExtSdk() promise first. The SDK is not available until initialization completes.

6. Update SDK Usage

The new @sleek/web-ext-sdk introduces a more modular and intuitive API design. Instead of global functions, you now operate on a specific tab context using .onTab(tabId) for all tab-related actions. Here’s a mapping of commonly used methods to help you migrate:

Before (Legacy SDK)

After (New SDK)

New Capabilities

Updated TypeDoc

Explore new capabilities:

Coupon auto-apply

Page classification

Product extraction

Order extraction

Affiliate activation detection

Installed extensions

View TypeDoc


Need help? Contact support@onsleek.com for questions or migration assistance.