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

[feature] Conditional compilation for SES compatibility #32

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

veronicaz41
Copy link
Contributor

@veronicaz41 veronicaz41 commented Mar 26, 2022

Webwokers are not supported in SES.
See the doc here: https://ses-secure-ecmascript.readthedocs.io/en/stable/getting-started.html#webworkers.
Added conditional compilation to not include Worker related code if env var SES is set.

Also when we run mm-snap eval in the node environment to build the snap, globalThis.btoa is undefined. Even though we want the snap eventually run in the browser environment. So add checking for whether globalThis.btoa is a function.

@veronicaz41 veronicaz41 changed the title Conditional compilation for SES compatibility [featurre] Conditional compilation for SES compatibility Mar 26, 2022
@veronicaz41 veronicaz41 changed the title [featurre] Conditional compilation for SES compatibility [feature] Conditional compilation for SES compatibility Mar 26, 2022
@veronicaz41
Copy link
Contributor Author

cc @phated FYI, this works for us

@veronicaz41 veronicaz41 marked this pull request as ready for review March 29, 2022 00:42
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

Successfully merging this pull request may close these issues.

1 participant