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

Build breaks in a CommonJS environment #1221

Closed
dypsilon opened this issue Sep 26, 2016 · 3 comments
Closed

Build breaks in a CommonJS environment #1221

dypsilon opened this issue Sep 26, 2016 · 3 comments

Comments

@dypsilon
Copy link

The dist breaks any build which has a module object defined. This object is always defined in a CommonJS environment. The error I get is:

Uncaught ReferenceError: process is not defined

This error results from this check:

var isElectron = typeof module === 'object' && process && process.versions && process.versions.electron;

module is an object because we have CommonJS but process is undefined because we are neither in node.js, nor in electron.

This issue is related to #1123.

@paradite
Copy link
Contributor

looks like this just needs an additional check && typeof process !== 'undefined' before && process?

@j0k3r
Copy link
Contributor

j0k3r commented Sep 29, 2016

Yep think so!

@paradite
Copy link
Contributor

I've opened a PR for this.

@j0k3r j0k3r closed this as completed in f032037 Sep 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants