Skip to content

[feature] Conditional compilation for SES compatibility#32

Open
veronicaz41 wants to merge 3 commits intoiden3:masterfrom
veronicaz41:vzheng/thread
Open

[feature] Conditional compilation for SES compatibility#32
veronicaz41 wants to merge 3 commits intoiden3:masterfrom
veronicaz41:vzheng/thread

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