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)
43 lines
1.2 KiB
TypeScript
43 lines
1.2 KiB
TypeScript
import path from 'node:path'
|
|
import webpack from 'webpack'
|
|
import { InsightsWebpackPlugin } from '@insights/webpack-plugin'
|
|
import packageJson from './package.json'
|
|
|
|
const config: webpack.Configuration = {
|
|
mode: 'production',
|
|
entry: './src/index.ts',
|
|
output: {
|
|
filename: 'bundle.js',
|
|
path: path.resolve(__dirname, 'dist'),
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.tsx?$/,
|
|
use: 'ts-loader',
|
|
exclude: /node_modules/,
|
|
},
|
|
],
|
|
},
|
|
resolve: {
|
|
extensions: ['.tsx', '.ts', '.js'],
|
|
},
|
|
plugins: [
|
|
new InsightsWebpackPlugin({
|
|
personalApiKey: process.env.INSIGHTS_PERSONAL_API_KEY,
|
|
projectId: process.env.INSIGHTS_PROJECT_ID,
|
|
host: process.env.INSIGHTS_API_HOST,
|
|
logLevel: 'error',
|
|
cliBinaryPath: process.env.INSIGHTS_CLI_PATH,
|
|
sourcemaps: {
|
|
enabled: true,
|
|
releaseName: packageJson.name,
|
|
releaseVersion: packageJson.version,
|
|
deleteAfterUpload: true,
|
|
},
|
|
}),
|
|
],
|
|
}
|
|
|
|
export default config
|