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

a build with the order plugin outputs the module before it's dependencies #52

Closed
neonstalwart opened this issue Dec 19, 2010 · 3 comments

Comments

@neonstalwart
Copy link
Contributor

if you build requirejs/tests/order/foo.js the output is generated in the wrong order - foo.js is included before all the dependencies. it should be last.

actual:

Tracing dependencies for: foo

foo.js
----------------
require/order.js
foo.js
one.js
two.js
three.js

expected:

Tracing dependencies for: foo

foo.js
----------------
require/order.js
one.js
two.js
three.js
foo.js
@jrburke
Copy link
Member

jrburke commented Dec 20, 2010

Does this cause a bug? My first instinct is to say the actual result matches the load order in the browser, before a build; foo.js is loaded, then the one, two and three files are loaded. So I would tend to want to preserve the order in which they are loaded in the non-build case, to keep the behavior roughly the same.

@neonstalwart
Copy link
Contributor Author

now that #53 is fixed - i can see that there is no bug caused by this and your logic makes perfect sense. without the build, the calls to define happen in that same order so it should work and it makes for a good argument that the right/better thing to do is to actually preserve that order.

btw, a general "thanks" for your responsiveness in addressing my issues.

@neonstalwart
Copy link
Contributor Author

actually... the behavior has changed back to where the module is now included after it's dependencies (my expected output above). there's no bug or problem with that but just wanted to bring it to your attention in case you don't want it to be that way.

This issue was closed.
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