GHC 2022-08-23

1 comment.

, https://git.io/..... in antfu/vitesse-webext
Noticed another problem with `refactor/mv3`: global `define`s aren't available to option, popup, etc., since compared to the normal `@vite/client`, `mv3client.mjs` does not import `vite/src/client/env.ts` where the `__DEFINES__` are. Not sure what's the best solution, but a quick and dirty way to fix this is to manually bind each define to window in `scripts/client.ts`, e.g.

```ts
declare global {
  interface Window {
    __APP_VERSION__: string;
  }
}

window.__APP_VERSION__ = __APP_VERSION__;
```