diff --git a/packages/vite-plugin-web-extension/package.json b/packages/vite-plugin-web-extension/package.json index 849a5b58..e462719a 100644 --- a/packages/vite-plugin-web-extension/package.json +++ b/packages/vite-plugin-web-extension/package.json @@ -49,6 +49,7 @@ "lodash.uniqby": "^4.7.0", "md5": "^2.3.0", "vite": "^5.0.0 || ^4.1.4", + "web-ext-option-types": "8.3.0", "web-ext-run": "^0.2.1", "webextension-polyfill": "^0.10.0", "yaml": "^2.3.4" diff --git a/packages/vite-plugin-web-extension/src/options.ts b/packages/vite-plugin-web-extension/src/options.ts index 9c98ac24..d854e25a 100644 --- a/packages/vite-plugin-web-extension/src/options.ts +++ b/packages/vite-plugin-web-extension/src/options.ts @@ -1,4 +1,5 @@ import * as vite from "vite"; +import type * as webext from "web-ext-option-types"; import type Browser from "webextension-polyfill"; export type Manifest = any; @@ -85,7 +86,7 @@ export interface UserOptions { * Optional startup configuration for web-ext. For list of options, see * . */ - webExtConfig?: any; + webExtConfig?: webext.RunOptions; /** * Output path to a JSON file containing information about the generated bundles. diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 25f5edaf..4c3197be 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -212,6 +212,9 @@ importers: vite: specifier: ^5.0.0 || ^4.1.4 version: 5.0.2(@types/node@18.11.18)(sass@1.54.8) + web-ext-option-types: + specifier: 8.3.0 + version: 8.3.0 web-ext-run: specifier: ^0.2.1 version: 0.2.1 @@ -4519,6 +4522,10 @@ packages: graceful-fs: 4.2.10 dev: false + /web-ext-option-types@8.3.0: + resolution: {integrity: sha512-ZjePdOX7bfNGCaGNgNa0oCnzuGIx1oNT5/scGdgL4gAboQ/j6O0AjR7ivpYof3PTTyWgBkxNzjCWnHE0abmzHw==} + dev: false + /web-ext-run@0.2.1: resolution: {integrity: sha512-5D11VcjdGkA1/xax5UWL0YeAbDySKHzWFe6EpsoPNUMw5Uk9tKk9p6GUOfcaI5N7sINKfBMZYNsTBiu5dzJB9A==} engines: {node: '>=18.0.0', npm: '>=8.0.0'}