You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our team can't use the IIFE build because they do not work in salesforce LWC, so instead we've just been internally building module builds with faro-web-sdk instead
Proposed solution
It would be nice if you could do something like this:
npm i @grafana/faro-web-sdk
npx faro-web-sdk build -- --output-format=module
echo ./node_modules/@grafana/faro-web-sdk/packages/web-sdk/dist/bundle/...
Context
The iife distribution does not work when either manually trying to load it as a <script> or when using loadScript, likely due to Salesforce's locker security constraints. This is because the Lightning Locker prevents third party scripts from setting global variables, which means even though the sdk loads, it isn't actually accessible at all for initializing in the application code.
The text was updated successfully, but these errors were encountered:
Another option would be to include a module build by default.
Currently Faro includes cjs and esm builds and the IIFE bundle by default so users don't need to compile it themselves.
Description
Our team can't use the IIFE build because they do not work in salesforce LWC, so instead we've just been internally building
module
builds withfaro-web-sdk
insteadProposed solution
It would be nice if you could do something like this:
Context
The
iife
distribution does not work when either manually trying to load it as a<script>
or when usingloadScript
, likely due to Salesforce's locker security constraints. This is because the Lightning Locker prevents third party scripts from setting global variables, which means even though the sdk loads, it isn't actually accessible at all for initializing in the application code.The text was updated successfully, but these errors were encountered: