Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
whitespace after "require" changes behavior #265
A very simple test case at http://shovemedia.com/requirejsissue.zip
See /js/Main.js for two lines you can swap back and forth.
Tested with the latest version before sending, both commented and minified.
Silly capitalization. Knew I should have double-checked my link
On May 11, 2012, at 1:23 PM, James Burke firstname.lastname@example.org wrote:
Ouch, yeah, just a regexp problem. Looks like there was a recent change in the behavior of Function.prototype.toString() in at least Chrome, probably all latest WebKit browsers. For what it is worth, this is only an issue in source form, after a build it, the optimizer would have found it correctly. But the source form is super important to have working, and the regexp should have allowed for this anyway.
It is fixed now in the dev2.0 branch, and I updated the errors page to mention this problem in 1.0.x, may do a backport if a 1.0.9 release gets scheduled.
I'm not sure I follow the "build" workflow you mention. Can you point me to a resource that explains?
On May 11, 2012, at 2:15 PM, James Burke wrote: