@syncfy/authentication-widget 1.6.1 → 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
@@ -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
+ ```