Hi guys, we are developing an extension and we need to open a new tab when a user installs the extension.
That's exactly what this boilerplate does in background/main.ts:
browser.runtime.onInstalled.addListener((): void => {
console.log('Extension installed')
})
But apparently Safari doesn't fire the event(the listener is created correctly but never is called), we have done some tests using webpack for build the extension and it does fire the event, the code is almost the same for webpack and vite.
We don't know where the problem could be, if it's in the vite plugin or in safari itself
Reproduction
We follow the README instructions, when we build the project after that, we use: xcrun safari-web-extension-converter --app-name vittesse --macos-only . To transform the extension for safari, we run the extension in Safari and the event doesn't fire.
Describe the bug
Hi guys, we are developing an extension and we need to open a new tab when a user installs the extension.
That's exactly what this boilerplate does in background/main.ts: browser.runtime.onInstalled.addListener((): void => { console.log('Extension installed') })
But apparently Safari doesn't fire the event(the listener is created correctly but never is called), we have done some tests using webpack for build the extension and it does fire the event, the code is almost the same for webpack and vite.
We don't know where the problem could be, if it's in the vite plugin or in safari itself
Reproduction
We follow the README instructions, when we build the project after that, we use: xcrun safari-web-extension-converter --app-name vittesse --macos-only . To transform the extension for safari, we run the extension in Safari and the event doesn't fire.
System Info
Used Package Manager
pnpm
Validations