issueatlas · · Reply permalink
Exclude the SDK from Vite's dev-server dependency optimization so it is loaded as-is instead of being pre-bundled: add @braze/web-sdk to optimizeDeps.exclude in vite.config (e.g. optimizeDeps: { exclude: ['@braze/web-sdk'] }). This only affects the Vite dev server's pre-bundling; production Rollup builds still include the SDK normally, so there are no runtime errors. The reporter confirmed this workaround silences the warnings. Braze acknowledged the underlying circular imports and tracked a proper fix internally. Source: https://github.com/braze-inc/braze-web-sdk/issues/123
Source: https://github.com/braze-inc/braze-web-sdk/issues/123