Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/alexperezortuno/ce-blocker/llms.txt

Use this file to discover all available pages before exploring further.

public/manifest.json declares the Chrome extension’s metadata, permissions, and entry points. At build time, vite.config.ts reads src/manifest.json and merges name, description, and version from package.json into the final manifest via the generateManifest() helper, ensuring the values in dist/manifest.json always stay in sync with package.json.

Full Manifest

{
  "manifest_version": 3,
  "name": "Traffic blocker",
  "description": "Customize your browsing experience by blocking unwanted traffic",
  "version": "0.1.2",
  "action": {
    "default_popup": "index.html",
    "default_icon": "blocker.png"
  },
  "permissions": [
    "storage",
    "webRequest",
    "declarativeNetRequest",
    "declarativeNetRequestFeedback",
    "nativeMessaging"
  ],
  "host_permissions": [
    "http://*/*",
    "https://*/*"
  ],
  "web_accessible_resources": [
    {
      "resources": [],
      "matches": ["<all_urls>"]
    }
  ],
  "background": {
    "service_worker": "assets/background.js"
  }
}

Field Reference

manifest_version
number
required
Must be 3 for Manifest V3. Chrome has deprecated MV2 and requires MV3 for all new and updated extensions submitted to the Chrome Web Store.
action.default_popup
string
The HTML file shown when the user clicks the extension’s toolbar icon. Resolves to index.html at the root of the dist/ directory, which is the Vite-built popup entry point.
action.default_icon
string
The icon file displayed in the Chrome toolbar. References blocker.png, which is copied from public/ to dist/ during the build.
permissions
string[]
Chrome APIs the extension is permitted to call at runtime:
PermissionPurpose
storagePersist blocking rules and settings via chrome.storage
webRequestRead-only access to network request lifecycle events
declarativeNetRequestDeclare and apply dynamic URL-blocking rules
declarativeNetRequestFeedbackQuery which rules matched recent requests (blocked traffic counter)
nativeMessagingReserved for future communication with a native host process
host_permissions
string[]
URL patterns the extension is allowed to intercept and inspect. The patterns http://*/* and https://*/* grant access to all HTTP and HTTPS URLs, which is required for declarativeNetRequest rules to apply across all sites.
background.service_worker
string
Path to the background script relative to the dist/ root. The value assets/background.js matches the output path produced by the rollupOptions.output.entryFileNames pattern in vite.config.ts.

Version Merging at Build Time

The source manifest under src/manifest.json intentionally keeps a static version field. At build time, vite.config.ts calls readJsonFile('package.json') and spreads name, description, and version from package.json on top of the manifest before Vite writes dist/manifest.json:
function generateManifest() {
    const manifest = readJsonFile("src/manifest.json");
    const pkg = readJsonFile("package.json");
    return {
        name: pkg.name,
        description: pkg.description,
        version: pkg.version,
        ...manifest,
    };
}
This means bumping the version in package.json is the single source of truth — the manifest version updates automatically on the next build.
Do not edit dist/manifest.json directly — it is overwritten on every build. Edit src/manifest.json and package.json instead.

Build docs developers (and LLMs) love