@syncfy/authentication-widget 1.6.0 → 2.0.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/README.md CHANGED
@@ -21,7 +21,7 @@ npm install --save @syncfy/authentication-widget
21
21
  Import styles
22
22
 
23
23
  ```
24
- import "@syncfy/authentication-widget/dist/style.css";
24
+ import "@syncfy/authentication-widget/dist/syncfy-authentication-widget.css";
25
25
  ```
26
26
 
27
27
  Import SyncfyWidget class
@@ -63,3 +63,16 @@ var syncfyWidget = new SyncfyWidget({
63
63
  });
64
64
 
65
65
  ```
66
+
67
+ ## ⚠️ Environment Compatibility
68
+
69
+ If you are using modern build tools (like Vite in Angular 16+ or Next.js), you may encounter a ReferenceError: global is not defined. This happens because modern environments do not include Node.js polyfills by default.
70
+ To resolve this, add the following shim to your project's entry point (e.g., polyfills.ts, main.ts, or layout.tsx):
71
+
72
+ ```
73
+ // Fix for "global is not defined"
74
+
75
+ if (typeof global === 'undefined') {
76
+ (window as any).global = window;
77
+ }
78
+ ```