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
Replacing typeof window with "object" and dead code elimination from that is the entire behavior of the browser builds, if you'd like to avoid it, you can avoid generating browser builds and use the general builds in browsers.
Issue:
In
snippet.ts
I have the following snippet which checks for browser environment.In the build files
snippet.browser.cjs.js
andsnippet.browser.esm.js
the above snippet is transpiled into:stripping out the
typeof window !== 'undefined'
check.However, in the build files
snippet.cjs.js
andsnippet.esm.js
the above snippet is transpiled into:as expected.
Expected behaviour:
This very check
typeof window !== 'undefined'
should not be stripped out of the*.broswer.cjs.js
and*.browser.esm.js
build files.Question:
The text was updated successfully, but these errors were encountered: