@rudderstack/analytics-js 3.0.0-beta.9 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +155 -0
- package/README.md +58 -11
- package/dist/npm/index.d.ts +324 -217
- package/dist/npm/legacy/cjs/index.js +1707 -1671
- package/dist/npm/legacy/esm/index.js +1708 -1667
- package/dist/npm/legacy/umd/index.js +1707 -1671
- package/dist/npm/modern/bundled/cjs/index.js +3260 -0
- package/dist/npm/modern/bundled/esm/index.js +3256 -0
- package/dist/npm/modern/bundled/umd/index.js +3266 -0
- package/dist/npm/modern/cjs/index.js +369 -332
- package/dist/npm/modern/content-script/cjs/index.js +3236 -0
- package/dist/npm/modern/content-script/esm/index.js +3232 -0
- package/dist/npm/modern/content-script/umd/index.js +3242 -0
- package/dist/npm/modern/esm/index.js +370 -328
- package/dist/npm/modern/umd/index.js +369 -332
- package/package.json +32 -15
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,161 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
+
## [3.0.1](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.0.0-beta.24...@rudderstack/analytics-js@3.0.1) (2024-03-21)
|
6
|
+
|
7
|
+
### Dependency Updates
|
8
|
+
|
9
|
+
* `@rudderstack/analytics-js-common` updated to version `3.0.0`
|
10
|
+
* `@rudderstack/analytics-js-plugins` updated to version `3.0.0`
|
11
|
+
## [3.0.0-beta.24](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.0.0-beta.23...@rudderstack/analytics-js@3.0.0-beta.24) (2024-03-18)
|
12
|
+
|
13
|
+
## [3.0.0-beta.23](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.0.0-beta.22...@rudderstack/analytics-js@3.0.0-beta.23) (2024-03-01)
|
14
|
+
|
15
|
+
|
16
|
+
### Features
|
17
|
+
|
18
|
+
* fetch anonymous id by cookie name provided in load option ([#1625](https://github.com/rudderlabs/rudder-sdk-js/issues/1625)) ([d8ccb10](https://github.com/rudderlabs/rudder-sdk-js/commit/d8ccb109f82398db8f53c51c0ac8f24cd1fd872e))
|
19
|
+
* reserved elements list updated ([#1632](https://github.com/rudderlabs/rudder-sdk-js/issues/1632)) ([20417fa](https://github.com/rudderlabs/rudder-sdk-js/commit/20417fa49e8e38c0d0092a470d98e9e72e2269f5))
|
20
|
+
|
21
|
+
|
22
|
+
### Bug Fixes
|
23
|
+
|
24
|
+
* **analytics-js-loading-scripts:** add version in polyfill io url ([#1630](https://github.com/rudderlabs/rudder-sdk-js/issues/1630)) ([3e315a6](https://github.com/rudderlabs/rudder-sdk-js/commit/3e315a6555871ef3cadb93236191a38bc21a2973))
|
25
|
+
* **rudder-sdk-js:** updated component-emitter to latest, supporting TS ([#1626](https://github.com/rudderlabs/rudder-sdk-js/issues/1626)) ([ffc0f24](https://github.com/rudderlabs/rudder-sdk-js/commit/ffc0f24e15bdaa8209860b287219e0a4dab4a0c4))
|
26
|
+
|
27
|
+
## [3.0.0-beta.22](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.0.0-beta.21...@rudderstack/analytics-js@3.0.0-beta.22) (2024-02-16)
|
28
|
+
|
29
|
+
## [3.0.0-beta.21](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.0.0-beta.20...@rudderstack/analytics-js@3.0.0-beta.21) (2024-02-02)
|
30
|
+
|
31
|
+
|
32
|
+
### Features
|
33
|
+
|
34
|
+
* **analytics-js:** auto expose new instance to window.rudderanalytics for npm usage ([#1599](https://github.com/rudderlabs/rudder-sdk-js/issues/1599)) ([27000ec](https://github.com/rudderlabs/rudder-sdk-js/commit/27000ec81f2d221ddaf206ceb0ed87ae2a8fc4e5))
|
35
|
+
* **analytics-js:** change default value of storage migrate flag to true ([#1602](https://github.com/rudderlabs/rudder-sdk-js/issues/1602)) ([6349436](https://github.com/rudderlabs/rudder-sdk-js/commit/6349436b8f6311e9f2fc74021dae864b2fdd4419))
|
36
|
+
|
37
|
+
## [3.0.0-beta.20](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.0.0-beta.19...@rudderstack/analytics-js@3.0.0-beta.20) (2024-01-19)
|
38
|
+
|
39
|
+
|
40
|
+
### Features
|
41
|
+
|
42
|
+
* attach global error listeners ([#1586](https://github.com/rudderlabs/rudder-sdk-js/issues/1586)) ([b416897](https://github.com/rudderlabs/rudder-sdk-js/commit/b416897445c0e27b13853af44ed203daefd3f720))
|
43
|
+
|
44
|
+
## [3.0.0-beta.19](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.0.0-beta.18...@rudderstack/analytics-js@3.0.0-beta.19) (2024-01-08)
|
45
|
+
|
46
|
+
|
47
|
+
### Bug Fixes
|
48
|
+
|
49
|
+
* enhance error handling ([#1568](https://github.com/rudderlabs/rudder-sdk-js/issues/1568)) ([0f08ba4](https://github.com/rudderlabs/rudder-sdk-js/commit/0f08ba4009de27647e2220aa2e56e30d5a99e902))
|
50
|
+
* localstorage retry patch and upgrade packages ([#1573](https://github.com/rudderlabs/rudder-sdk-js/issues/1573)) ([b14d027](https://github.com/rudderlabs/rudder-sdk-js/commit/b14d0276cc7dedf87062530eab404f7a924fecf7))
|
51
|
+
|
52
|
+
## [3.0.0-beta.18](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.0.0-beta.17...@rudderstack/analytics-js@3.0.0-beta.18) (2023-12-13)
|
53
|
+
|
54
|
+
|
55
|
+
### Bug Fixes
|
56
|
+
|
57
|
+
* **analytics-js:** new export that excludes all third party host scripts ([#1533](https://github.com/rudderlabs/rudder-sdk-js/issues/1533)) ([999d8fa](https://github.com/rudderlabs/rudder-sdk-js/commit/999d8fa0262e7cd7b021404ec28a99fc64dd323d))
|
58
|
+
|
59
|
+
## [3.0.0-beta.17](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.0.0-beta.16...@rudderstack/analytics-js@3.0.0-beta.17) (2023-12-06)
|
60
|
+
|
61
|
+
|
62
|
+
### Bug Fixes
|
63
|
+
|
64
|
+
* **analytics-js:** post ready callback invocations ([#1535](https://github.com/rudderlabs/rudder-sdk-js/issues/1535)) ([996fb9a](https://github.com/rudderlabs/rudder-sdk-js/commit/996fb9ad47bd9a28da533c5807873ea71f2f1f24))
|
65
|
+
|
66
|
+
## [3.0.0-beta.16](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.0.0-beta.15...@rudderstack/analytics-js@3.0.0-beta.16) (2023-12-01)
|
67
|
+
|
68
|
+
|
69
|
+
### Features
|
70
|
+
|
71
|
+
* **analytics-js-loading-scripts:** add loading snippet version in event context ([#1483](https://github.com/rudderlabs/rudder-sdk-js/issues/1483)) ([4873cbc](https://github.com/rudderlabs/rudder-sdk-js/commit/4873cbc183879c0c1825cf939a53b6cf570cdf4e))
|
72
|
+
|
73
|
+
|
74
|
+
### Bug Fixes
|
75
|
+
|
76
|
+
* initialisation of bugsnag in chrome extension ([#1516](https://github.com/rudderlabs/rudder-sdk-js/issues/1516)) ([af970c9](https://github.com/rudderlabs/rudder-sdk-js/commit/af970c94ad45c50fcbbca0d0e7597fdefa08b154))
|
77
|
+
* multiple onReady invocation ([#1522](https://github.com/rudderlabs/rudder-sdk-js/issues/1522)) ([bf3b09b](https://github.com/rudderlabs/rudder-sdk-js/commit/bf3b09bef82eaf13f34bd538a080fd9f5e557e78))
|
78
|
+
* update polyfill list and add version ([#1518](https://github.com/rudderlabs/rudder-sdk-js/issues/1518)) ([653d58e](https://github.com/rudderlabs/rudder-sdk-js/commit/653d58e782c7449c7f7afe851665a59912287750))
|
79
|
+
|
80
|
+
## [3.0.0-beta.15](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.0.0-beta.14...@rudderstack/analytics-js@3.0.0-beta.15) (2023-11-13)
|
81
|
+
|
82
|
+
|
83
|
+
### Features
|
84
|
+
|
85
|
+
* add beacon polyfill ([#1487](https://github.com/rudderlabs/rudder-sdk-js/issues/1487)) ([8053ae2](https://github.com/rudderlabs/rudder-sdk-js/commit/8053ae2ec7c5757bb65a1881ca1b79fe08c30fc7))
|
86
|
+
* buffer consent method invocations ([#1501](https://github.com/rudderlabs/rudder-sdk-js/issues/1501)) ([70f6f64](https://github.com/rudderlabs/rudder-sdk-js/commit/70f6f64500b6b08bbb657498ec0e1fdecf72b82c))
|
87
|
+
* consent api wrap up ([#1477](https://github.com/rudderlabs/rudder-sdk-js/issues/1477)) ([edc78ac](https://github.com/rudderlabs/rudder-sdk-js/commit/edc78ac54235aabfc8d1d78f961fbd650a3b7c73))
|
88
|
+
* reinitialize persistent data from consent options ([#1465](https://github.com/rudderlabs/rudder-sdk-js/issues/1465)) ([43f30b7](https://github.com/rudderlabs/rudder-sdk-js/commit/43f30b7296ae9a0862810fd0b3c520e8bddf614c))
|
89
|
+
|
90
|
+
|
91
|
+
### Bug Fixes
|
92
|
+
|
93
|
+
* gcm post consent issues ([#1507](https://github.com/rudderlabs/rudder-sdk-js/issues/1507)) ([6241d3d](https://github.com/rudderlabs/rudder-sdk-js/commit/6241d3da28edc9b5f478774a763226d9d72f7dcc))
|
94
|
+
* gcm qa fixes ([#1499](https://github.com/rudderlabs/rudder-sdk-js/issues/1499)) ([84ca784](https://github.com/rudderlabs/rudder-sdk-js/commit/84ca784e6848e7fd8988c4a93db46d4636f2f89c))
|
95
|
+
* storage migration to allow empty string values ([#1488](https://github.com/rudderlabs/rudder-sdk-js/issues/1488)) ([b639fa1](https://github.com/rudderlabs/rudder-sdk-js/commit/b639fa17f22d1bbad951b293c9edba36f164163e))
|
96
|
+
|
97
|
+
## [3.0.0-beta.14](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.0.0-beta.13...@rudderstack/analytics-js@3.0.0-beta.14) (2023-10-27)
|
98
|
+
|
99
|
+
|
100
|
+
### Features
|
101
|
+
|
102
|
+
* alter life cycle for pre consent ([#1411](https://github.com/rudderlabs/rudder-sdk-js/issues/1411)) ([60ec092](https://github.com/rudderlabs/rudder-sdk-js/commit/60ec0924a1229678fb16d76a34a494c40a622a11))
|
103
|
+
* auto capture timezone as a part of context ([#1464](https://github.com/rudderlabs/rudder-sdk-js/issues/1464)) ([8e66069](https://github.com/rudderlabs/rudder-sdk-js/commit/8e660693d75727d2131a57ca57859e6d0b920e84))
|
104
|
+
* configure cookie to be fetched from exact domain ([#1468](https://github.com/rudderlabs/rudder-sdk-js/issues/1468)) ([4db1b10](https://github.com/rudderlabs/rudder-sdk-js/commit/4db1b10b45b4ffcd652aec6bd684943ca35c6c08))
|
105
|
+
* consent api ([#1458](https://github.com/rudderlabs/rudder-sdk-js/issues/1458)) ([216b405](https://github.com/rudderlabs/rudder-sdk-js/commit/216b405f7c319d5ff2d799d2e3a5efe2ee4a03af))
|
106
|
+
|
107
|
+
|
108
|
+
### Bug Fixes
|
109
|
+
|
110
|
+
* **analytics-js:** correct declared global extended type ([#1460](https://github.com/rudderlabs/rudder-sdk-js/issues/1460)) ([3f15290](https://github.com/rudderlabs/rudder-sdk-js/commit/3f1529037ba0541391b5f8033e37f867fdd7931c))
|
111
|
+
* **analytics-js:** fix remote import error when npm package is bundled with webpack ([#1466](https://github.com/rudderlabs/rudder-sdk-js/issues/1466)) ([3a818ac](https://github.com/rudderlabs/rudder-sdk-js/commit/3a818accd24e6b3667c75a6b60fb12aba36bdf7e))
|
112
|
+
* **monorepo:** update vulnerable dependencies ([#1457](https://github.com/rudderlabs/rudder-sdk-js/issues/1457)) ([7a4bc4c](https://github.com/rudderlabs/rudder-sdk-js/commit/7a4bc4cc641e4fff2a8f561ce6fd67d16c0cd5a0))
|
113
|
+
* upgrade vulnerable cryptoJS dependency, rolup to v4 & NX to v17 ([#1471](https://github.com/rudderlabs/rudder-sdk-js/issues/1471)) ([b2bb21c](https://github.com/rudderlabs/rudder-sdk-js/commit/b2bb21cb3f618f6c86f593d1706abe9e6349066d))
|
114
|
+
|
115
|
+
## [3.0.0-beta.13](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.0.0-beta.12...@rudderstack/analytics-js@3.0.0-beta.13) (2023-10-16)
|
116
|
+
|
117
|
+
|
118
|
+
### Features
|
119
|
+
|
120
|
+
* add support for session storage ([#1440](https://github.com/rudderlabs/rudder-sdk-js/issues/1440)) ([7e3106b](https://github.com/rudderlabs/rudder-sdk-js/commit/7e3106b5317af05ad28a9c0c22a50638dbaebdc2))
|
121
|
+
* **analytics-js-service-worker:** deprecate service worker export of rudder-sdk-js package in favor of the new standalone package([#1437](https://github.com/rudderlabs/rudder-sdk-js/issues/1437)) ([1797d3e](https://github.com/rudderlabs/rudder-sdk-js/commit/1797d3ef356e947a528c2de9abcfde245cc28178))
|
122
|
+
* dmt plugin for v3 ([#1412](https://github.com/rudderlabs/rudder-sdk-js/issues/1412)) ([97ee68a](https://github.com/rudderlabs/rudder-sdk-js/commit/97ee68a27daa5ce8c3a098cdc84c4ee7981f1149))
|
123
|
+
|
124
|
+
|
125
|
+
### Bug Fixes
|
126
|
+
|
127
|
+
* **analytics-js-loading-scripts:** add globalThis polyfill for safari ([#1446](https://github.com/rudderlabs/rudder-sdk-js/issues/1446)) ([bf111f8](https://github.com/rudderlabs/rudder-sdk-js/commit/bf111f8fc24fe75d183ea4924423e3c560ce457d))
|
128
|
+
* **analytics-js:** add global definitions extended window type ([#1445](https://github.com/rudderlabs/rudder-sdk-js/issues/1445)) ([b995635](https://github.com/rudderlabs/rudder-sdk-js/commit/b995635a7a3979173d35b34fa32b41b4429b166f))
|
129
|
+
* empty anonymous id after reset call ([#1433](https://github.com/rudderlabs/rudder-sdk-js/issues/1433)) ([b078347](https://github.com/rudderlabs/rudder-sdk-js/commit/b0783478917a75833f6e7133f10ad5f8999866de))
|
130
|
+
* identify traits type ([#1427](https://github.com/rudderlabs/rudder-sdk-js/issues/1427)) ([a58c919](https://github.com/rudderlabs/rudder-sdk-js/commit/a58c919ca36fc4e14d134455a08fe0e35f3e66ce))
|
131
|
+
* pass anonymous id load option to getanonymousid method ([#1443](https://github.com/rudderlabs/rudder-sdk-js/issues/1443)) ([e234a8f](https://github.com/rudderlabs/rudder-sdk-js/commit/e234a8fa7538ac84fbf451aa4b104c1b26b5a04e))
|
132
|
+
|
133
|
+
## [3.0.0-beta.12](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.0.0-beta.11...@rudderstack/analytics-js@3.0.0-beta.12) (2023-10-02)
|
134
|
+
|
135
|
+
|
136
|
+
### Bug Fixes
|
137
|
+
|
138
|
+
* **analytics-js,rudder-sdk-js:** dead object issue ([#1410](https://github.com/rudderlabs/rudder-sdk-js/issues/1410)) ([94f4b2d](https://github.com/rudderlabs/rudder-sdk-js/commit/94f4b2db11b32a6b4ddcb2b1eacf7cdbd1867ef3))
|
139
|
+
|
140
|
+
## [3.0.0-beta.11](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.0.0-beta.10...@rudderstack/analytics-js@3.0.0-beta.11) (2023-09-26)
|
141
|
+
|
142
|
+
|
143
|
+
### Bug Fixes
|
144
|
+
|
145
|
+
* **analytics-js-plugins:** add IE11 compatibility for crypto-es ([#1407](https://github.com/rudderlabs/rudder-sdk-js/issues/1407)) ([483ae44](https://github.com/rudderlabs/rudder-sdk-js/commit/483ae44ec59a5ddd72c0187e1c55128967e4289a))
|
146
|
+
|
147
|
+
## [3.0.0-beta.10](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.0.0-beta.9...@rudderstack/analytics-js@3.0.0-beta.10) (2023-09-26)
|
148
|
+
|
149
|
+
|
150
|
+
### Features
|
151
|
+
|
152
|
+
* optimize plugin chunks ([#1379](https://github.com/rudderlabs/rudder-sdk-js/issues/1379)) ([5acfa4d](https://github.com/rudderlabs/rudder-sdk-js/commit/5acfa4d61d85e01c44252749074021d0a782b59e))
|
153
|
+
|
154
|
+
|
155
|
+
### Bug Fixes
|
156
|
+
|
157
|
+
* **analytics-js:** enforce default cloud mode events delivery plugin ([#1402](https://github.com/rudderlabs/rudder-sdk-js/issues/1402)) ([e06d9b8](https://github.com/rudderlabs/rudder-sdk-js/commit/e06d9b80cd029e11a394f5a4e2069313f69b9349))
|
158
|
+
* plugins registering twice ([#1380](https://github.com/rudderlabs/rudder-sdk-js/issues/1380)) ([9de8f28](https://github.com/rudderlabs/rudder-sdk-js/commit/9de8f280f27245bcc0284d5033ce8ccbf05abe1b))
|
159
|
+
|
5
160
|
## [3.0.0-beta.9](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.0.0-beta.8...@rudderstack/analytics-js@3.0.0-beta.9) (2023-09-20)
|
6
161
|
|
7
162
|
## [3.0.0-beta.8](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.0.0-beta.7...@rudderstack/analytics-js@3.0.0-beta.8) (2023-09-18)
|
package/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<p align="center">
|
4
4
|
<a href="https://rudderstack.com/">
|
5
|
-
<img src="https://
|
5
|
+
<img alt="RudderStack" width="512" src="https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/develop/assets/rs-logo-full-light.jpg">
|
6
6
|
</a>
|
7
7
|
<br />
|
8
8
|
<caption>The Customer Data Platform for Developers</caption>
|
@@ -19,17 +19,20 @@
|
|
19
19
|
|
20
20
|
---
|
21
21
|
|
22
|
-
#
|
22
|
+
# @rudderstack/analytics-js
|
23
23
|
|
24
|
-
RudderStack
|
24
|
+
RudderStack JavaScript SDK for browsers.
|
25
25
|
|
26
26
|
> For detailed documentation on the RudderStack JavaScript SDK, click [**here**](https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/).
|
27
27
|
|
28
28
|
## Table of Contents
|
29
29
|
|
30
|
-
- [**Installing the package**](
|
30
|
+
- [**Installing the package**](#installing-the-package)
|
31
|
+
- [**How to build the SDK**](#How-to-build-the-SDK)
|
32
|
+
- [**Usage in Chrome Extensions**](#usage-in-chrome-extensions)
|
33
|
+
- [**Usage in Serverless Runtimes**](#usage-in-serverless-runtimes)
|
31
34
|
|
32
|
-
##
|
35
|
+
## Installing the package
|
33
36
|
|
34
37
|
To install the package via npm, run the following command:
|
35
38
|
|
@@ -39,15 +42,59 @@ npm install @rudderstack/analytics-js --save
|
|
39
42
|
|
40
43
|
**Note that this NPM module is only meant to be used for a browser installation**. If you want to integrate RudderStack with your Node.js application, refer to the [**RudderStack Node.js repository**](https://github.com/rudderlabs/rudder-sdk-node).
|
41
44
|
|
45
|
+
### Available exports
|
46
|
+
|
47
|
+
Default export will fetch the plugins during runtime as federated modules in separate requests.
|
48
|
+
|
49
|
+
```javascript
|
50
|
+
import { RudderAnalytics } from '@rudderstack/analytics-js';
|
51
|
+
|
52
|
+
const analytics = new RudderAnalytics();
|
53
|
+
analytics.load(<WRITE_KEY>, <DATA_PLANE_URL>);
|
54
|
+
window.rudderanalytics = analytics;
|
55
|
+
```
|
56
|
+
|
57
|
+
Bundled export will contain the plugins code as part of the bundle in build time.
|
58
|
+
|
59
|
+
```javascript
|
60
|
+
import { RudderAnalytics } from '@rudderstack/analytics-js/bundled';
|
61
|
+
|
62
|
+
const analytics = new RudderAnalytics();
|
63
|
+
analytics.load(<WRITE_KEY>, <DATA_PLANE_URL>);
|
64
|
+
window.rudderanalytics = analytics;
|
65
|
+
```
|
66
|
+
|
67
|
+
Legacy export will contain the plugins code as part of the bundle in build time and support legacy browsers like IE11.
|
68
|
+
|
69
|
+
```javascript
|
70
|
+
import { RudderAnalytics } from '@rudderstack/analytics-js/legacy';
|
71
|
+
|
72
|
+
const analytics = new RudderAnalytics();
|
73
|
+
analytics.load(<WRITE_KEY>, <DATA_PLANE_URL>);
|
74
|
+
window.rudderanalytics = analytics;
|
75
|
+
```
|
76
|
+
|
77
|
+
## How to build the SDK
|
78
|
+
|
79
|
+
Look for run scripts in the `package.json` file for getting the browser minified and non-minified builds. The builds are
|
80
|
+
updated in the `dist` folder of the directory. Among the others, some of the important ones are:
|
81
|
+
|
82
|
+
- `npm run build:browser:modern`: This outputs **dist/cdn/modern** folder that contains the cdn package contents.
|
83
|
+
- `npm run build:npm`: This outputs **dist/npm** folder that contains the npm package contents.
|
84
|
+
|
42
85
|
## Usage in Chrome Extensions
|
43
86
|
|
44
|
-
RudderStack JS SDK can be used
|
87
|
+
RudderStack JS SDK can be used in Chrome Extensions with manifest v3, both as a content script (via the JavaScript SDK package)
|
88
|
+
or as a background script service worker (via the [service worker package](https://www.npmjs.com/package/@rudderstack/analytics-js-service-worker)).
|
89
|
+
|
90
|
+
For examples and specific details look into [Chrome Extensions Usage](https://github.com/rudderlabs/rudder-sdk-js/blob/main/examples/chrome-extension/USAGE.md)
|
45
91
|
|
46
|
-
|
92
|
+
## Usage in Serverless Runtimes
|
47
93
|
|
48
|
-
|
94
|
+
RudderStack JS SDK [service worker](https://www.npmjs.com/package/@rudderstack/analytics-js-service-worker) can be used
|
95
|
+
in serverless runtimes like Cloudflare Workers or Vercel Edge functions.
|
49
96
|
|
50
|
-
|
97
|
+
For examples and specific details look into:
|
51
98
|
|
52
|
-
|
53
|
-
|
99
|
+
- [Vercel Edge Usage](https://github.com/rudderlabs/rudder-sdk-js/blob/main/examples/serverless/USAGE.md)
|
100
|
+
- [Cloudflare Worker Usage](https://github.com/rudderlabs/rudder-sdk-js/blob/main/examples/serverless/USAGE.md)
|