Skip to content

Commit 842c158

Browse files
authored
chore: Enable extensionApi: chrome in template projects (#1083)
1 parent b14c910 commit 842c158

File tree

6 files changed

+8
-2
lines changed

6 files changed

+8
-2
lines changed

packages/wxt/src/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ export interface InlineConfig {
329329
* Which extension API to use.
330330
*
331331
* - `"webextension-polyfill"`: Use `browser` and types from [`webextension-polyfill`](https://www.npmjs.com/package/webextension-polyfill).
332-
* - `"chrome"` (unstable): Use the regular `chrome` (or `browser` for Firefox/Safari) globals provided by the browser. Types provided by [`@types/chrome`](https://www.npmjs.com/package/@types/chrome), make sure to install the package or types won't work.
332+
* - `"chrome"`: Use the regular `chrome` (or `browser` for Firefox/Safari) globals provided by the browser. Types provided by [`@types/chrome`](https://www.npmjs.com/package/@types/chrome).
333333
*
334334
* @default "webextension-polyfill"
335335
* @since 0.19.0

templates/react/wxt.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ import { defineConfig } from 'wxt';
22

33
// See https://wxt.dev/api/config.html
44
export default defineConfig({
5+
extensionApi: 'chrome',
56
modules: ['@wxt-dev/module-react'],
67
});

templates/solid/wxt.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ import { defineConfig } from 'wxt';
22

33
// See https://wxt.dev/api/config.html
44
export default defineConfig({
5+
extensionApi: 'chrome',
56
modules: ['@wxt-dev/module-solid'],
67
});

templates/svelte/wxt.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ import { defineConfig } from 'wxt';
33
// See https://wxt.dev/api/config.html
44
export default defineConfig({
55
srcDir: 'src',
6+
extensionApi: 'chrome',
67
modules: ['@wxt-dev/module-svelte'],
78
});

templates/vanilla/wxt.config.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { defineConfig } from 'wxt';
22

33
// See https://wxt.dev/api/config.html
4-
export default defineConfig({});
4+
export default defineConfig({
5+
extensionApi: 'chrome',
6+
});

templates/vue/wxt.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ import { defineConfig } from 'wxt';
22

33
// See https://wxt.dev/api/config.html
44
export default defineConfig({
5+
extensionApi: 'chrome',
56
modules: ['@wxt-dev/module-vue'],
67
});

0 commit comments

Comments
 (0)