diff --git a/packages/analytics/modules/analytics/client.ts b/packages/analytics/modules/analytics/client.ts index b6adad92a..7bf6d3005 100644 --- a/packages/analytics/modules/analytics/client.ts +++ b/packages/analytics/modules/analytics/client.ts @@ -1,6 +1,7 @@ import { defineWxtPlugin } from 'wxt/sandbox'; import { storage } from 'wxt/storage'; import { useAppConfig } from 'wxt/client'; +import { browser } from 'wxt/browser'; import { Analytics, AnalyticsConfig, @@ -9,7 +10,6 @@ import { BaseAnalyticsEvent, } from './types'; import uaParser from 'ua-parser-js'; -import { browser } from 'wxt/browser'; export let analytics: Analytics; const ANALYTICS_PORT = 'wxt-analytics'; @@ -86,7 +86,9 @@ function createAnalyticsForwarder(): Analytics { * background, and for reporting forwarded events from the other contexts. */ function createBackgroundAnalytics(): Analytics { - const config = useAppConfig().analytics as AnalyticsConfig | undefined; + const config = (useAppConfig() as any).analytics as + | AnalyticsConfig + | undefined; // User properties storage const userIdStorage = diff --git a/packages/analytics/package.json b/packages/analytics/package.json index 474bd17c7..eb5a41e54 100644 --- a/packages/analytics/package.json +++ b/packages/analytics/package.json @@ -1,6 +1,6 @@ { "name": "@wxt-dev/analytics", - "version": "0.1.3", + "version": "0.1.4", "description": "Add analytics to your web extension", "repository": { "type": "git",