Skip to content

Commit

Permalink
chore: Use extensionApi: chrome in templates
Browse files Browse the repository at this point in the history
Goal here is to onboard more projects onto the API to make sure it works before switching the default for everyone
  • Loading branch information
aklinker1 committed Oct 19, 2024
1 parent 21894d2 commit 165120c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/wxt/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ export interface InlineConfig {
* Which extension API to use.
*
* - `"webextension-polyfill"`: Use `browser` and types from [`webextension-polyfill`](https://www.npmjs.com/package/webextension-polyfill).
* - `"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.
* - `"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).
*
* @default "webextension-polyfill"
* @since 0.19.0
Expand Down
1 change: 1 addition & 0 deletions templates/react/wxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ import { defineConfig } from 'wxt';

// See https://wxt.dev/api/config.html
export default defineConfig({
extensionApi: 'chrome',
modules: ['@wxt-dev/module-react'],
});
1 change: 1 addition & 0 deletions templates/solid/wxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ import { defineConfig } from 'wxt';

// See https://wxt.dev/api/config.html
export default defineConfig({
extensionApi: 'chrome',
modules: ['@wxt-dev/module-solid'],
});
1 change: 1 addition & 0 deletions templates/svelte/wxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ import { defineConfig } from 'wxt';
// See https://wxt.dev/api/config.html
export default defineConfig({
srcDir: 'src',
extensionApi: 'chrome',
modules: ['@wxt-dev/module-svelte'],
});
4 changes: 3 additions & 1 deletion templates/vanilla/wxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { defineConfig } from 'wxt';

// See https://wxt.dev/api/config.html
export default defineConfig({});
export default defineConfig({
extensionApi: 'chrome',
});
1 change: 1 addition & 0 deletions templates/vue/wxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ import { defineConfig } from 'wxt';

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

0 comments on commit 165120c

Please sign in to comment.