serversideup / webext-bridge

💬 Messaging in Web Extensions made easy. Batteries included.
https://serversideup.net/open-source/webext-bridge
MIT License
548 stars 50 forks source link

在 Vite中使用报错 TypeError: Cannot read properties of undefined (reading 'fingerprint') #71

Open sfyang2 opened 11 months ago

sfyang2 commented 11 months ago

// background.ts

import { sendMessage } from "webext-bridge/background"; sendMessage("test",{data:"test"}) //error: TypeError: Cannot read properties of undefined (reading 'fingerprint')

//demo //使用 vite-vue3-browser-extension-v3 模版创建的就能复现这个问题

quninnd commented 10 months ago

同样的问题

frei-l commented 6 months ago

same problem, check #57. be careful with import.