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

Update the require.js dependency to the latest version #14

Closed
fitzgen opened this issue Aug 14, 2012 · 5 comments
Closed

Update the require.js dependency to the latest version #14

fitzgen opened this issue Aug 14, 2012 · 5 comments

Comments

@fitzgen
Copy link
Contributor

fitzgen commented Aug 14, 2012

I got a ReferenceError regarding define when I tried to update. Need to come back to this.

@mishoo
Copy link
Contributor

mishoo commented Oct 29, 2012

There's a discussion in mishoo/UglifyJS#9 about this deprecation warning. Consensus is that the best fix is to upgrade requirejs. Tried to do it but generating the source map fails. Investigating, I was perplexed for a few moments at the following:

$ node
> sm = require("source-map")
{}   // ← empty
> sm   // few seconds later...
{ SourceMapGenerator: [Function: SourceMapGenerator],
  SourceMapConsumer: [Function: SourceMapConsumer],
  SourceNode: [Function: SourceNode] }   // ← it got stuff!

So it's async, I figured. I thought there must be a way to make requirejs load modules synchronously, but horror — there isn't! (or I can't find it) :-( The “async” madness is taken to an extreme. UglifyJS definitely expects the module to be loaded after require(...), not gonna turn my code upside down to make an indirect dependency happy...

Could we get rid of requirejs and perhaps use something else?

@michaelficarra
Copy link
Contributor

+1, get rid of requirejs. I couldn't understand why the choice to use requirejs was made.

@fitzgen
Copy link
Contributor Author

fitzgen commented Oct 29, 2012

I couldn't understand why the choice to use requirejs was made.

I chose to use RequireJS because it was the easiest way to support Node, browser environments, and building for inclusion inside Firefox. Any changes to the module and build systems will have to work for all three environments.

I will look in to this now.

@fitzgen
Copy link
Contributor Author

fitzgen commented Oct 29, 2012

Should be fixed in 64230e7

Just published 0.1.4 on npm.

@fitzgen fitzgen closed this as completed Oct 29, 2012
@mishoo
Copy link
Contributor

mishoo commented Oct 30, 2012

Neat, thanks. You introduced a small problem though, I sent a pull request: #29

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

No branches or pull requests

3 participants