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

jQuery 1.7 Breaking Almond When Optimizing To Single File #2

Closed
busticated opened this issue Nov 12, 2011 · 2 comments
Closed

jQuery 1.7 Breaking Almond When Optimizing To Single File #2

busticated opened this issue Nov 12, 2011 · 2 comments

Comments

@busticated
Copy link

Hey James -

Ran into this weird issue while trying to use Almond to run my optimized code. Looks like jQuery breaks the optimization step somehow?

Here's the isolated test case:
http://dl.dropbox.com/u/4584460/reqtest/index.html

The error I get using example #3 from the link above is:
Uncaught TypeError: undefined is not a function

Where 'undefined' should be jQuery. This goes away if I do not try to include jQuery (example #4).

FWIW, I'm also seeing this an error when I try to package my optimized code into a single file using require itself (example #2).
Uncaught ReferenceError: define is not defined

Running the unoptimized modules works fine (example #1).

I think I have my build configured properly but I'm not 100% sure.

Let me know if there's any additional info you could use.

Thanks!
-matt

jrburke added a commit that referenced this issue Nov 15, 2011
…s a build optimizatio with its own hidden define call and inlining of jQuery, it can be used properly with other jQuerys on the web. Part of Issue #2.
@jrburke
Copy link
Member

jrburke commented Nov 15, 2011

Thanks for the report! I just committed a change that should fix the jQuery issue. You can try this version of almond to confirm the fix.

For the other issue, I don't see require.js in the output, so that probably explains the "define is not defined" error. My first guess is that "reqLib", being mapped to ../js/require.js maybe is not the location of require.js, or a different file?

@busticated
Copy link
Author

thanks - the almond issue is resolved - works great!

require is still acting up... I tried moving the require.js file to /lib (as jquery is - trying to rule out a paths config issue) but that didn't help.

that said, this should probably go on the require issue tracker... so... i'll do that!

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

2 participants