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

`require is not defined` in v3.3.0 #83

martinhecher opened this issue Jul 22, 2016 · 2 comments


None yet
3 participants
Copy link

commented Jul 22, 2016

We are running into a regression with v3.3.0 when creating an UMD bundle that includes the NPM module oauthio-web.

Including the UMD bundle in a web page results in this error:

Uncaught ReferenceError: require is not defined

I created a repository to demonstrate the error:


npm install
npm start

opens a browser window. Opening the index.html there shows the error in the developer console.

The code works fine with v3.0.2.

It seems that this regression could be related to the following code change:

if ( name === 'require' && !scope.contains( name ) ) {



This comment has been minimized.

Copy link

commented Jul 29, 2016

I believe this is the same issue as #77. is built with browserify, which contains typeof require === "function" && require in its UMD wrapper. This plugin breaks that line by replacing typeof require without actually providing a valid require function.


This comment has been minimized.

Copy link

commented Sep 17, 2016

Sorry for the epic wait – fixed in 5.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.