@posthog/rollup-plugin 1.1.2 → 1.1.3
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 +8 -10
- package/package.json +2 -2
- package/src/index.ts +3 -6
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,KAAK,EAAE,MAAM,EAA2C,MAAM,QAAQ,CAAA;AAC7E,OAAO,EAAiC,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAG/E,MAAM,WAAW,0BAA0B;IACvC,cAAc,EAAE,MAAM,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,UAAU,CAAC,EAAE;QACT,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAC9B,CAAA;CACJ;AAgBD,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,WAAW,EAAE,0BAA0B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAA2C,MAAM,QAAQ,CAAA;AAC7E,OAAO,EAAiC,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAG/E,MAAM,WAAW,0BAA0B;IACvC,cAAc,EAAE,MAAM,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,UAAU,CAAC,EAAE;QACT,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAC9B,CAAA;CACJ;AAgBD,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,WAAW,EAAE,0BAA0B,GAkD1E,MAAM,CACd"}
|
package/dist/index.js
CHANGED
|
@@ -20,18 +20,16 @@ function posthogRollupPlugin(userOptions) {
|
|
|
20
20
|
'process'
|
|
21
21
|
];
|
|
22
22
|
const cliPath = posthogOptions.cliBinaryPath;
|
|
23
|
-
if (options.dir) {
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
if ('chunk' === chunk.type) args.push('--include', `**/${fileName}`);
|
|
23
|
+
if (options.dir) for(const fileName in bundle){
|
|
24
|
+
const chunk = bundle[fileName];
|
|
25
|
+
if ('chunk' === chunk.type) {
|
|
26
|
+
const chunkPath = path.resolve(options.dir, fileName);
|
|
27
|
+
args.push('--file', chunkPath);
|
|
29
28
|
}
|
|
30
|
-
}
|
|
29
|
+
}
|
|
30
|
+
else if (options.file) {
|
|
31
31
|
const filePath = path.resolve(options.file);
|
|
32
|
-
|
|
33
|
-
args.push('--directory', parentDirectory);
|
|
34
|
-
args.push('--include', filePath);
|
|
32
|
+
args.push('--file', filePath);
|
|
35
33
|
}
|
|
36
34
|
if (posthogOptions.sourcemaps.project) args.push('--project', posthogOptions.sourcemaps.project);
|
|
37
35
|
if (posthogOptions.sourcemaps.version) args.push('--version', posthogOptions.sourcemaps.version);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@posthog/rollup-plugin",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "PostHog Rollup plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@posthog/cli": "~0.5.
|
|
18
|
+
"@posthog/cli": "~0.5.17",
|
|
19
19
|
"@posthog/core": "1.7.1"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
package/src/index.ts
CHANGED
|
@@ -48,19 +48,16 @@ export default function posthogRollupPlugin(userOptions: PostHogRollupPluginOpti
|
|
|
48
48
|
const args = ['sourcemap', 'process']
|
|
49
49
|
const cliPath = posthogOptions.cliBinaryPath
|
|
50
50
|
if (options.dir) {
|
|
51
|
-
const directory = path.resolve(options.dir)
|
|
52
|
-
args.push('--directory', directory)
|
|
53
51
|
for (const fileName in bundle) {
|
|
54
52
|
const chunk = bundle[fileName]
|
|
55
53
|
if (chunk.type === 'chunk') {
|
|
56
|
-
|
|
54
|
+
const chunkPath = path.resolve(options.dir, fileName)
|
|
55
|
+
args.push('--file', chunkPath)
|
|
57
56
|
}
|
|
58
57
|
}
|
|
59
58
|
} else if (options.file) {
|
|
60
59
|
const filePath = path.resolve(options.file)
|
|
61
|
-
|
|
62
|
-
args.push('--directory', parentDirectory)
|
|
63
|
-
args.push('--include', filePath)
|
|
60
|
+
args.push('--file', filePath)
|
|
64
61
|
}
|
|
65
62
|
if (posthogOptions.sourcemaps.project) {
|
|
66
63
|
args.push('--project', posthogOptions.sourcemaps.project)
|