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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to make typeof process !== 'undefined'
false
#9549
Comments
sagivf
pushed a commit
to Azure/monaco-kusto
that referenced
this issue
Feb 28, 2024
- Patch monaco-editor in order to get esm-parcel sample working - Aside: Looks like CI didn't catch this? - Fix both `0.45.0` and `0.46.0` monaco-editor versions resolve in the repo - Bumped parcel version - Replaces `~0.46.0` monaco-editor versions with `^0.46.0` for consistency, and so we don't need 2 lines in packages.json#resolutions This seems like more of a Parcel issue than a monaco-editor one, so I've opened an issue on them: parcel-bundler/parcel#9549
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
馃悰 bug report
process !== globalThis.process
when package.json has{ "alias": { "process": false } }
.I tried updating package.json#alias.process to resolve to a few different file types:
module.export = undefined
,export default = undefined
,馃 Expected Behavior
process
should resolve the same value asglobalThis.process
. It should be possible to maketypeof process !== 'undefined
return false.馃槸 Current Behavior
Some dependencies, like the Monaco editor, use
typeof process !== 'undefined'
to check if they're running in node. Setting{ "alias": { "process": false } }
causesglobalThis.process
to be false, butprocess
to be an empty object ({}
). That's to say,globalThis.process
is not the same asprocess
.馃敠 Context
This has caused problems integrating with the Monaco editor.
The text was updated successfully, but these errors were encountered: