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

Does not register module. #5

Open
akidee opened this issue May 8, 2011 · 1 comment
Open

Does not register module. #5

akidee opened this issue May 8, 2011 · 1 comment

Comments

@akidee
Copy link

akidee commented May 8, 2011

Example:

require.def({
    "underscorex": {
        injects: [ 'require', 'exports', 'module' ],
        factory: function (require, exports, module) {

            var _ = exports = module.exports = require('underscore');
            console.log(_)

            // libary defined here
        }
    },
    "underscore": {
        injects: [ 'require', 'exports', 'module' ],
        factory: function (require, exports, module) {


            var _ = ...

            // Must be commented out, because Yabble does not define module.exports
            if (typeof module !== 'undefined'/* && module.exports*/) {
            module.exports = _;
                _._ = _;
            } else {
                root._ = _;
            }

            // libary defined here
        }
    }
})

console.log() prints {} instead of the underscore library.

@akidee
Copy link
Author

akidee commented May 10, 2011

Fixed by #6

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

1 participant