@posthog/webpack-plugin 1.2.27 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -4
- package/dist/index.mjs +9 -4
- package/package.json +3 -3
- package/src/index.ts +4 -5
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,eAAe,CAAA;AACpD,OAAO,EAAE,YAAY,EAAiB,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAC5E,OAAO,OAAO,MAAM,SAAS,CAAA;AAI7B,cAAc,UAAU,CAAA;AAExB,qBAAa,oBAAoB;IAC7B,cAAc,EAAE,oBAAoB,CAAA;IACpC,MAAM,EAAE,MAAM,CAAA;gBAEF,YAAY,EAAE,YAAY;IAatC,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,GAAG,IAAI;IA0BjC,iBAAiB,CAAC,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,eAAe,CAAA;AACpD,OAAO,EAAE,YAAY,EAAiB,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAC5E,OAAO,OAAO,MAAM,SAAS,CAAA;AAI7B,cAAc,UAAU,CAAA;AAExB,qBAAa,oBAAoB;IAC7B,cAAc,EAAE,oBAAoB,CAAA;IACpC,MAAM,EAAE,MAAM,CAAA;gBAEF,YAAY,EAAE,YAAY;IAatC,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,GAAG,IAAI;IA0BjC,iBAAiB,CAAC,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;CAgDzG"}
|
package/dist/index.js
CHANGED
|
@@ -95,13 +95,17 @@ var __webpack_exports__ = {};
|
|
|
95
95
|
}
|
|
96
96
|
async processSourceMaps(compilation, config) {
|
|
97
97
|
const outputDirectory = compilation.outputOptions.path;
|
|
98
|
-
const args = [
|
|
99
|
-
|
|
98
|
+
const args = [
|
|
99
|
+
'sourcemap',
|
|
100
|
+
'process',
|
|
101
|
+
'--stdin'
|
|
102
|
+
];
|
|
100
103
|
const chunkArray = Array.from(compilation.chunks);
|
|
101
104
|
if (0 == chunkArray.length) return;
|
|
105
|
+
const filePaths = [];
|
|
102
106
|
chunkArray.forEach((chunk)=>chunk.files.forEach((file)=>{
|
|
103
107
|
const chunkPath = path__WEBPACK_IMPORTED_MODULE_3___default().resolve(outputDirectory, file);
|
|
104
|
-
|
|
108
|
+
filePaths.push(chunkPath);
|
|
105
109
|
}));
|
|
106
110
|
if (config.sourcemaps.releaseName) args.push('--release-name', config.sourcemaps.releaseName);
|
|
107
111
|
if (config.sourcemaps.releaseVersion) args.push('--release-version', config.sourcemaps.releaseVersion);
|
|
@@ -116,7 +120,8 @@ var __webpack_exports__ = {};
|
|
|
116
120
|
POSTHOG_CLI_API_KEY: config.personalApiKey,
|
|
117
121
|
POSTHOG_CLI_PROJECT_ID: config.projectId
|
|
118
122
|
},
|
|
119
|
-
stdio: 'inherit'
|
|
123
|
+
stdio: 'inherit',
|
|
124
|
+
stdin: filePaths.join('\n') + '\n'
|
|
120
125
|
});
|
|
121
126
|
}
|
|
122
127
|
constructor(pluginConfig){
|
package/dist/index.mjs
CHANGED
|
@@ -26,13 +26,17 @@ class PosthogWebpackPlugin {
|
|
|
26
26
|
}
|
|
27
27
|
async processSourceMaps(compilation, config) {
|
|
28
28
|
const outputDirectory = compilation.outputOptions.path;
|
|
29
|
-
const args = [
|
|
30
|
-
|
|
29
|
+
const args = [
|
|
30
|
+
'sourcemap',
|
|
31
|
+
'process',
|
|
32
|
+
'--stdin'
|
|
33
|
+
];
|
|
31
34
|
const chunkArray = Array.from(compilation.chunks);
|
|
32
35
|
if (0 == chunkArray.length) return;
|
|
36
|
+
const filePaths = [];
|
|
33
37
|
chunkArray.forEach((chunk)=>chunk.files.forEach((file)=>{
|
|
34
38
|
const chunkPath = path.resolve(outputDirectory, file);
|
|
35
|
-
|
|
39
|
+
filePaths.push(chunkPath);
|
|
36
40
|
}));
|
|
37
41
|
if (config.sourcemaps.releaseName) args.push('--release-name', config.sourcemaps.releaseName);
|
|
38
42
|
if (config.sourcemaps.releaseVersion) args.push('--release-version', config.sourcemaps.releaseVersion);
|
|
@@ -47,7 +51,8 @@ class PosthogWebpackPlugin {
|
|
|
47
51
|
POSTHOG_CLI_API_KEY: config.personalApiKey,
|
|
48
52
|
POSTHOG_CLI_PROJECT_ID: config.projectId
|
|
49
53
|
},
|
|
50
|
-
stdio: 'inherit'
|
|
54
|
+
stdio: 'inherit',
|
|
55
|
+
stdin: filePaths.join('\n') + '\n'
|
|
51
56
|
});
|
|
52
57
|
}
|
|
53
58
|
constructor(pluginConfig){
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@posthog/webpack-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Webpack plugin for Posthog 🦔",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"module": "./dist/index.mjs",
|
|
17
17
|
"types": "./dist/index.d.ts",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@posthog/cli": "~0.
|
|
20
|
-
"@posthog/core": "1.
|
|
19
|
+
"@posthog/cli": "~0.7.2",
|
|
20
|
+
"@posthog/core": "1.24.0"
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
23
|
"dist",
|
package/src/index.ts
CHANGED
|
@@ -51,10 +51,7 @@ export class PosthogWebpackPlugin {
|
|
|
51
51
|
|
|
52
52
|
async processSourceMaps(compilation: webpack.Compilation, config: ResolvedPluginConfig): Promise<void> {
|
|
53
53
|
const outputDirectory = compilation.outputOptions.path
|
|
54
|
-
const args = []
|
|
55
|
-
|
|
56
|
-
// chunks are output outside of the output directory for server chunks
|
|
57
|
-
args.push('sourcemap', 'process')
|
|
54
|
+
const args = ['sourcemap', 'process', '--stdin']
|
|
58
55
|
|
|
59
56
|
const chunkArray = Array.from(compilation.chunks)
|
|
60
57
|
|
|
@@ -63,10 +60,11 @@ export class PosthogWebpackPlugin {
|
|
|
63
60
|
return
|
|
64
61
|
}
|
|
65
62
|
|
|
63
|
+
const filePaths: string[] = []
|
|
66
64
|
chunkArray.forEach((chunk) =>
|
|
67
65
|
chunk.files.forEach((file) => {
|
|
68
66
|
const chunkPath = path.resolve(outputDirectory, file)
|
|
69
|
-
|
|
67
|
+
filePaths.push(chunkPath)
|
|
70
68
|
})
|
|
71
69
|
)
|
|
72
70
|
|
|
@@ -96,6 +94,7 @@ export class PosthogWebpackPlugin {
|
|
|
96
94
|
POSTHOG_CLI_PROJECT_ID: config.projectId,
|
|
97
95
|
},
|
|
98
96
|
stdio: 'inherit',
|
|
97
|
+
stdin: filePaths.join('\n') + '\n',
|
|
99
98
|
})
|
|
100
99
|
}
|
|
101
100
|
}
|