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.
vite.config.ts configures the Vite build for two entry points — the popup and the background service worker — and sets a Bootstrap path alias for SCSS imports. It imports readJsonFile from vite-plugin-web-extension to power the generateManifest() helper, which merges package.json metadata into dist/manifest.json on every build. Note that the webExtension plugin itself is not added to the plugins array — only vue() is registered there.
Full Configuration
Key Settings
Enables Vue 3 Single File Component (SFC) compilation. All
.vue files in src/ are processed by @vitejs/plugin-vue during bundling.Maps the
~bootstrap prefix to the Bootstrap package in node_modules/. This allows SCSS files to use concise imports such as @import '~bootstrap/scss/bootstrap' without needing to resolve the full node_modules path manually.Set to
"esnext" to target modern, evergreen browsers. Chrome extensions run exclusively in Chrome, which fully supports the latest ECMAScript features, so no legacy transpilation is needed.The popup entry point:
"index.html". Rollup bundles this HTML file and all its imported scripts and styles into dist/, producing the popup UI loaded when the user clicks the toolbar icon.The service worker entry point:
"src/background/background.ts". This module runs as the MV3 background service worker and handles declarativeNetRequest rule management.The output filename pattern
"assets/[name].js" causes Rollup to emit the two entry points as assets/popup.js and assets/background.js. The background.js path matches the value declared in manifest.json under background.service_worker.