Skip to content

Commit 1fe0730

Browse files
fix: normalize path for createAnalytics of analytics/index.ts (#2013)
1 parent 6ae5fb5 commit 1fe0730

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • packages/analytics/modules/analytics

packages/analytics/modules/analytics/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
} from 'wxt/modules';
99
import { relative, resolve } from 'node:path';
1010
import type { AnalyticsConfig } from './types';
11+
import { normalizePath } from 'wxt';
1112

1213
declare module 'wxt/utils/define-app-config' {
1314
export interface WxtAppConfig {
@@ -42,7 +43,7 @@ export default defineWxtModule({
4243
`import { createAnalytics } from '${
4344
process.env.NPM
4445
? clientModuleId
45-
: relative(wxtAnalyticsFolder, clientModuleId)
46+
: normalizePath(relative(wxtAnalyticsFolder, clientModuleId))
4647
}';`,
4748
`import { useAppConfig } from '#imports';`,
4849
``,

0 commit comments

Comments
 (0)