Adds a ./react subpath export to @repo/core-analytics containing
<AnalyticsProvider value={IAnalytics}> and useAnalytics(): IAnalytics.
useAnalytics() throws AnalyticsContextError when called outside a provider.
React Testing Library test verifies track() flows through context using
RecordingAnalytics. Switches vitest config to pick up .tsx test files
via environmentMatchGlobs and extends tsconfig to react-library.json
for JSX support.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
13 lines
253 B
JSON
13 lines
253 B
JSON
{
|
|
"extends": "@repo/core-typescript/react-library.json",
|
|
"compilerOptions": {
|
|
"outDir": "dist",
|
|
"rootDir": ".",
|
|
"paths": {
|
|
"@/*": ["./src/*"]
|
|
}
|
|
},
|
|
"include": ["**/*.ts", "**/*.tsx"],
|
|
"exclude": ["node_modules", "dist"]
|
|
}
|