wxt icon indicating copy to clipboard operation
wxt copied to clipboard

`browser` is not defined in svelte

Open sacrosanctic opened this issue 1 year ago • 0 comments

Describe the bug

'browser' is not defined svelte(missing-declaration)

The above message appears when using browser inside a svelte file.

Reproduction

wxt.zip

Steps to reproduce

pnpm dlx wxt@latest init .
> choose svelte
> choose pnpm

open .\src\entrypoints\popup\App.svelte add {browser.runtime.id} to Line 5

pnpm i
pnpm dev

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (12) x64 12th Gen Intel(R) Core(TM) i5-12400F
    Memory: 17.64 GB / 31.86 GB
  Binaries:
    Node: 18.18.2 - C:\Program Files\nodejs\node.EXE
    npm: 10.7.0 - ~\AppData\Roaming\npm\npm.CMD
    pnpm: 9.7.0 - ~\AppData\Local\pnpm\pnpm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527

Used Package Manager

pnpm

Validations

sacrosanctic avatar Aug 11 '24 09:08 sacrosanctic