Skip to content

Commit

Permalink
feat: add type safety to webExtConfig options (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson authored Dec 30, 2024
1 parent 651a9f7 commit baed744
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/vite-plugin-web-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion packages/vite-plugin-web-extension/src/options.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -85,7 +86,7 @@ export interface UserOptions {
* Optional startup configuration for web-ext. For list of options, see
* <https://github.com/mozilla/web-ext/blob/666886f40a967b515d43cf38fc9aec67ad744d89/src/program.js#L559>.
*/
webExtConfig?: any;
webExtConfig?: webext.RunOptions;

/**
* Output path to a JSON file containing information about the generated bundles.
Expand Down
7 changes: 7 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit baed744

Please sign in to comment.