fix: normalize path for createAnalytics of analytics/index.ts (#2013)

This commit is contained in:
Patryk Kuniczak
2026-02-08 15:05:09 +01:00
committed by GitHub
parent 6ae5fb5edb
commit 1fe073004b
@@ -8,6 +8,7 @@ import {
} from 'wxt/modules';
import { relative, resolve } from 'node:path';
import type { AnalyticsConfig } from './types';
import { normalizePath } from 'wxt';
declare module 'wxt/utils/define-app-config' {
export interface WxtAppConfig {
@@ -42,7 +43,7 @@ export default defineWxtModule({
`import { createAnalytics } from '${
process.env.NPM
? clientModuleId
: relative(wxtAnalyticsFolder, clientModuleId)
: normalizePath(relative(wxtAnalyticsFolder, clientModuleId))
}';`,
`import { useAppConfig } from '#imports';`,
``,