Skip to content

Commit 1e8d589

Browse files
committed
feat: add Safari support in manifest and update browser handling in Vite config
1 parent 5eda13c commit 1e8d589

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

packages/extension/src/manifest/manifest.safari.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ import { defineManifest, ManifestV3Export } from '@crxjs/vite-plugin';
22
import { chromeManifest } from './manifest.chrome';
33
const safariManifest = {
44
...chromeManifest,
5+
background: {
6+
scripts: ['src/scripts/chrome/background.ts'],
7+
type: 'module',
8+
},
59
action: {
610
default_icon: {
711
'16': 'assets/img/safari-icons/icon16.png',

packages/extension/vite.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ export default defineConfig({
8383
transformManifest(),
8484
crx({
8585
manifest: getManifest(),
86-
browser: BROWSER === 'firefox' ? 'firefox' : 'chrome',
86+
browser:
87+
BROWSER === 'firefox' || BROWSER === 'safari' ? 'firefox' : 'chrome',
8788
contentScripts: {
8889
injectCss: false,
8990
},

0 commit comments

Comments
 (0)