Skip to content

Commit 83f5d07

Browse files
authored
feat(err): add webpack plugin package (#2589)
* add webpack playground * add package json webpack playground * add webpack plugin package * move core logger * update nextjs package to use webpack plugin * update workspace * remove webpack from eslint * use pnp nodeLinker * update nextjs example * remove dead code * add webpack plugin to templates * add changeset * make greptile happy * fix stuff * update lockfile
1 parent 599f0c0 commit 83f5d07

30 files changed

+2755
-678
lines changed

.changeset/busy-bobcats-greet.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@posthog/nextjs-config': minor
3+
---
4+
5+
use webpack plugin

.changeset/legal-snails-wonder.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@posthog/webpack-plugin': major
3+
---
4+
5+
initial release

.changeset/tough-badgers-jam.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@posthog/core': patch
3+
---
4+
5+
export logger creation

.eslintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ module.exports = {
7272
'packages/react-native/**',
7373
'packages/node/**',
7474
'packages/web/**',
75+
'packages/webpack-plugin/**',
7576
'packages/rollup-plugin/**',
7677
'examples/**',
7778
'playground/**',

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ _Please describe._
2626
- [ ] @posthog/nextjs-config
2727
- [ ] @posthog/nuxt
2828
- [ ] @posthog/rollup-plugin
29+
- [ ] @posthog/webpack-plugin
2930

3031
## Additional context
3132

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ _Please describe._
2424
- [ ] @posthog/nextjs-config
2525
- [ ] @posthog/nuxt
2626
- [ ] @posthog/rollup-plugin
27+
- [ ] @posthog/webpack-plugin
2728

2829
## Additional context
2930

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
- name: "@posthog/nextjs-config"
2828
- name: "@posthog/nuxt"
2929
- name: "@posthog/rollup-plugin"
30+
- name: "@posthog/webpack-plugin"
3031

3132
steps:
3233
- name: Checkout the repository

examples/example-nextjs/next.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ export default withPostHogConfig(nextConfig, {
1111
host: process.env.NEXT_PUBLIC_POSTHOG_API_HOST!,
1212
cliBinaryPath: process.env.POSTHOG_CLI_PATH, // Optional
1313
logLevel: 'debug',
14+
cliBinaryPath: process.env.POSTHOG_CLI_PATH,
1415
sourcemaps: {
1516
project: 'example-nextjs',
1617
version: packageJson.version,
18+
deleteAfterUpload: true,
1719
},
1820
})

examples/example-nextjs/pnpm-lock.yaml

Lines changed: 245 additions & 224 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/src/posthog-core-stateless.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { SimpleEventEmitter } from './eventemitter'
22
import { getFeatureFlagValue, normalizeFlagsResponse } from './featureFlagUtils'
33
import { gzipCompress, isGzipSupported } from './gzip'
4-
import { createLogger } from './logger'
54
import {
65
PostHogFlagsResponse,
76
PostHogCoreOptions,
@@ -31,6 +30,7 @@ import {
3130
RetriableOptions,
3231
safeSetTimeout,
3332
STRING_FORMAT,
33+
createLogger,
3434
} from './utils'
3535
import { uuidv7 } from './vendor/uuidv7'
3636

0 commit comments

Comments
 (0)