mirror of
https://github.com/hanzoai/insights.git
synced 2026-10-30 16:15:31 +00:00
common/replay-headless could not build: esbuild could not resolve
"insights-js/rrweb-types". The subpath does not exist. insights-js resolves to
@hanzo/insights, whose tarball keeps those modules at
lib/src/extensions/replay/types/ and publishes no exports map, so nothing maps
the short name onto them. Upstream gets away with the same import because there
posthog-js is a workspace package with source layout; here it is a registry
tarball.
The types are published on their own as @hanzo/insights-rrweb-types and
@hanzo/insights-rrweb. frontend already depended on both and reached them
through two tsconfig paths entries; the replay packages had neither the
dependency nor the mapping, so they were the half of the tree the alias did not
cover.
Rather than widen the alias to a second place, this removes it: every import
names the package that provides it, and both replay packages declare what they
use.
62 imports in 44 files insights-js/rrweb* -> @hanzo/insights-rrweb*
tsconfig.json two paths entries dropped, no longer referenced
replay-shared/headless declare @hanzo/insights-rrweb{,-types} 0.0.26
replay-headless drops insights-js: nothing in it referenced insights-js
jest.config.js transformIgnorePatterns follows the real package, or
the ESM it exists to let through stops being transformed
Latent since the 08-01 rebase brought these packages and these imports in
together; surfaced today when c5f6b5940 started COPYing them into the image, so
turbo began building what nodejs already declared as a dependency.
Co-authored-by: Hanzo Dev <[email protected]>
77 lines
4.1 KiB
JSON
77 lines
4.1 KiB
JSON
{
|
|
"compilerOptions": {
|
|
"paths": {
|
|
"lib/*": ["./frontend/src/lib/*"],
|
|
"scenes/*": ["./frontend/src/scenes/*"],
|
|
"@hanzo/elements": ["./frontend/@hanzo/elements/src/index"],
|
|
"@hanzo/elements/*": ["./frontend/@hanzo/elements/src/*"],
|
|
"@hanzo/icons": ["./frontend/node_modules/@hanzo/icons"],
|
|
"@hanzo/shared-onboarding/*": ["./docs/onboarding/*"],
|
|
"storybook/*": ["./.storybook/*"],
|
|
"~/*": ["./frontend/src/*"],
|
|
"public/*": ["./frontend/public/*"],
|
|
"products/*": ["./products/*"],
|
|
"@playwright-utils": ["./playwright/utils/index"],
|
|
"@playwright-utils/*": ["./playwright/utils/*"],
|
|
"@playwright-pages/*": ["./playwright/page-models/*"],
|
|
"@playwright-mocks/*": ["./playwright/mocks/*"],
|
|
"@common/*": ["./common/*"],
|
|
"@hanzo/mcp-ui": ["./services/mcp/src/ui-apps/lib/index.ts"],
|
|
"@hanzo/mcp-ui/*": ["./services/mcp/src/ui-apps/lib/*"],
|
|
"@hanzo/replay-shared": ["./common/replay-shared/src/index.ts"],
|
|
"@hanzo/replay-shared/*": ["./common/replay-shared/src/*"],
|
|
"@hanzo/quill-charts": ["./packages/quill/packages/charts/src/index.ts"],
|
|
"@hanzo/quill-charts/*": ["./packages/quill/packages/charts/src/*"],
|
|
// Needed to access the subpath since torph didn't set up types properly
|
|
"torph/react": ["./frontend/node_modules/torph/dist/react/index"],
|
|
// [email protected] only exposes types under `node`/`browser` conditions,
|
|
// which TS bundler resolution doesn't activate. Point at the .d.ts directly.
|
|
"use-debounce": ["./frontend/node_modules/use-debounce/dist/index"],
|
|
"*": ["./frontend/*"]
|
|
},
|
|
// https://www.sitepoint.com/react-with-typescript-best-practices/
|
|
"allowJs": true, // Allow JavaScript files to be compiled
|
|
"skipLibCheck": true, // Skip type checking of all declaration files
|
|
"esModuleInterop": true, // Disables namespace imports (import * as fs from "fs") and enables CJS style imports (import fs from "fs")
|
|
"allowSyntheticDefaultImports": true, // Allow default imports from modules with no default export
|
|
"strict": true, // Enable all strict type checking options
|
|
"forceConsistentCasingInFileNames": true, // Disallow inconsistently-cased references to the same file.
|
|
"module": "esnext", // Specify module code generation
|
|
"moduleResolution": "bundler", // Frontend is bundled (esbuild); pairs with module: esnext
|
|
"isolatedModules": true,
|
|
"incremental": true,
|
|
"resolveJsonModule": true, // Include modules imported with .json extension
|
|
"noEmit": true, // Do not emit output (meaning do not compile code, only perform type checking)
|
|
"jsx": "react-jsx", // Support JSX in .tsx files
|
|
"target": "es2021",
|
|
"sourceMap": true, // Generate corrresponding .map file
|
|
"declaration": true, // Generate corresponding .d.ts file
|
|
"noUnusedLocals": true, // Report errors on unused locals
|
|
"noUnusedParameters": true, // Report errors on unused parameters
|
|
"noImplicitOverride": true, // Require the `override` modifier when overriding a base class member
|
|
"allowUnreachableCode": false, // Raise errors on unreachable code
|
|
"allowUnusedLabels": false, // Raise errors on unused labels
|
|
"experimentalDecorators": true, // Enables experimental support for ES decorators
|
|
"noFallthroughCasesInSwitch": true, // Report errors for fallthrough cases in switch statement
|
|
"lib": ["dom", "es2023"]
|
|
},
|
|
"include": [
|
|
"frontend/**/*",
|
|
".storybook/**/*",
|
|
"playwright/**/*",
|
|
"products/**/frontend/**/*",
|
|
"products/**/manifest.tsx",
|
|
"common/esbuilder/*",
|
|
"common/replay-shared/src/**/*",
|
|
"common/storybook/*",
|
|
"docs/onboarding/**/*",
|
|
"packages/quill/packages/charts/src/**/*"
|
|
],
|
|
"exclude": ["frontend/dist/**/*", "**/*.mdx"],
|
|
"ts-node": {
|
|
"compilerOptions": {
|
|
"module": "commonjs"
|
|
}
|
|
}
|
|
}
|