Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating to 1.13.0 creates a "crypto" warning when building #363

Open
adrianostas opened this issue Feb 20, 2025 · 2 comments
Open

Updating to 1.13.0 creates a "crypto" warning when building #363

adrianostas opened this issue Feb 20, 2025 · 2 comments

Comments

@adrianostas
Copy link

Hey! We are using the SDK for Web Inbox testing. After upgrading to version 1.13.0, we get a warning when building the app. We have a Nuxt 3 app with SSR enabled. The CleverTap web SDK is integrated as a client-side plugin. Any idea on how to solve this? Thanks!

[plugin:vite:resolve] [plugin vite:resolve] Module "crypto" has been externalized for browser compatibility, imported by "/home/runner/work/taste-network/taste-network/node_modules/clevertap-web-sdk/clevertap.js".

@kkyusuftk
Copy link
Collaborator

@adrianostas can you share how you are initialising CleverTap?
Here is my hunch: Clevertap code is getting executed on the server which is why you are getting that warning.

@adrianostas
Copy link
Author

Thanks for your reply. Normally, it should not because the plugin is prefixed with .client it should run only on the client and not on the server. We switched to manually injecting the script because the SDK was increasing our bundle size. BTW do you have some examples that I can follow for a custom web Inbox integration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants