mirror of
https://github.com/hanzoai/insights-js.git
synced 2026-10-30 18:34:19 +00:00
Bulk rename across 989 files: - Package names: posthog-js → @hanzo/insights, posthog-node → @hanzo/insights-node, etc. - Repository URLs: posthog/posthog-js → hanzoai/insights-js - Brand names: PostHog → Insights - File renames: 259 reference JSON files, source files, workflow files - Directory rename: eslint-plugin-posthog-js → eslint-plugin-insights Remaining: 8 refs to @posthog/rrweb-* (real npm deps, need fork+publish)
1.3 KiB
1.3 KiB
Insights Next.js Config
This package handles sourcemap configuration and upload for the Insights Error Tracking product.
Please see the main Insights Error Tracking docs.
Usage
// next.config.ts
import { withInsightsConfig } from '@hanzo/nextjs-config'
const nextConfig = {
// Your Next.js configuration here
}
export default withInsightsConfig(nextConfig, {
personalApiKey: process.env.INSIGHTS_PERSONAL_API_KEY!, // Personal API key used for sourcemap uploads, see https://app.insights.hanzo.ai/settings/user-api-keys
projectId: process.env.INSIGHTS_PROJECT_ID!, // Project ID, see https://app.insights.hanzo.ai/settings/project#variables
host: process.env.NEXT_PUBLIC_INSIGHTS_HOST!, // (optional) Host URL, defaults to https://us.insights.hanzo.ai
sourcemaps: {
// (optional)
enabled: true, // (optional) Enable sourcemaps generation and upload, default to true on production builds
releaseName: 'my-application', // (optional) Release name, defaults to repository name
releaseVersion: '1.0.0', // (optional) Release version, defaults to current git commit
deleteAfterUpload: true, // (optional) Delete sourcemaps after upload, defaults to true
},
})