@sawport/react-sdk 1.2.5-alpha.1 → 1.2.5-alpha.2

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.
Files changed (2) hide show
  1. package/README.md +3 -1
  2. package/package.json +4 -2
package/README.md CHANGED
@@ -19,9 +19,11 @@
19
19
  ### Pull in the sawport SDK into your website
20
20
  After pulling the sawport SDK
21
21
  Global variable `sawportSDK` will be exposed to your webpage which you can access its method and properties.
22
+
23
+ **Important**: Use the `standalone` bundle for CDN usage to prevent React version conflicts:
22
24
  ```html
23
25
  ...
24
- <script type="module" src="https://unpkg.com/@sawport/react-sdk@latest/dist/index.js"></script>
26
+ <script type="module" src="https://unpkg.com/@sawport/react-sdk@latest/dist/index.standalone.js"></script>
25
27
  </body>
26
28
  ```
27
29
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sawport/react-sdk",
3
- "version": "1.2.5-alpha.1",
3
+ "version": "1.2.5-alpha.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.umd.js",
6
6
  "module": "./dist/index.js",
@@ -11,6 +11,7 @@
11
11
  "require": "./dist/index.umd.js",
12
12
  "default": "./dist/index.js"
13
13
  },
14
+ "./standalone": "./dist/index.standalone.js",
14
15
  "./dist/style.css": "./dist/react-sdk.css"
15
16
  },
16
17
  "dependencies": {
@@ -29,7 +30,8 @@
29
30
  "scripts": {
30
31
  "dev": "vite",
31
32
  "build": "tsc -b && vite build",
32
- "build:lib": "tsc -b && LIB=1 vite build",
33
+ "build:lib": "tsc -b && LIB=1 vite build && vite build --config vite.config.standalone.ts",
34
+ "build:standalone": "vite build --config vite.config.standalone.ts",
33
35
  "build:types": "tsc -b",
34
36
  "example:build": "cd example && yarn build",
35
37
  "example:build:dev": "cd example && yarn build:dev",