{"action":"created","issue":{"url":"https://api.github.com/repos/requirejs/almond/issues/40","repository_url":"https://api.github.com/repos/requirejs/almond","labels_url":"https://api.github.com/repos/requirejs/almond/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/requirejs/almond/issues/40/comments","events_url":"https://api.github.com/repos/requirejs/almond/issues/40/events","html_url":"https://github.com/requirejs/almond/issues/40","id":7109756,"number":40,"title":"Uncaught ReferenceError: exports is not defined","user":{"login":"sebcante","id":627921,"avatar_url":"https://avatars0.githubusercontent.com/u/627921?v=3","gravatar_id":"","url":"https://api.github.com/users/sebcante","html_url":"https://github.com/sebcante","followers_url":"https://api.github.com/users/sebcante/followers","following_url":"https://api.github.com/users/sebcante/following{/other_user}","gists_url":"https://api.github.com/users/sebcante/gists{/gist_id}","starred_url":"https://api.github.com/users/sebcante/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebcante/subscriptions","organizations_url":"https://api.github.com/users/sebcante/orgs","repos_url":"https://api.github.com/users/sebcante/repos","events_url":"https://api.github.com/users/sebcante/events{/privacy}","received_events_url":"https://api.github.com/users/sebcante/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2012-09-25T00:18:22Z","updated_at":"2017-05-05T11:02:47Z","closed_at":"2012-09-25T01:49:12Z","body":"Hi james,\n\nI am migrating to require 2.0 and using almond. I have a couple of shim configured it is working fine when using require.js but after minification (using almond instead of require.js) it seems that something is missing : \n\nerror : Uncaught ReferenceError: exports is not defined\ngetGlobal does not seem exist.\n\nhere is the code created as build time\n\n``` javascript\ndefine(\"backbone\", [\"underscore\",\"jquery\"], (function (global) {\n    return function () {\n        var func = function () {\n\n                            return getGlobal(exports); <-- Uncaught ReferenceError: exports is not defined\n\n                        };\n        return func.apply(global, arguments);\n    }\n}(this)));\n```\n\nThis example uses the following shim \n\n``` javascript\n   shim:{\n        'backbone': {\n            //These script dependencies should be loaded before loading\n            //backbone.js\n            deps: ['underscore', 'jquery'],\n            //Once loaded, use the global 'Backbone' as the\n            //module value.\n            exports: 'Backbone'\n        },   [...]\n```\n\nVersion : \nr.js 2.0.6\nalmond 0.1.4\n"},"comment":{"url":"https://api.github.com/repos/requirejs/almond/issues/comments/299437356","html_url":"https://github.com/requirejs/almond/issues/40#issuecomment-299437356","issue_url":"https://api.github.com/repos/requirejs/almond/issues/40","id":299437356,"user":{"login":"amivit","id":1857719,"avatar_url":"https://avatars0.githubusercontent.com/u/1857719?v=3","gravatar_id":"","url":"https://api.github.com/users/amivit","html_url":"https://github.com/amivit","followers_url":"https://api.github.com/users/amivit/followers","following_url":"https://api.github.com/users/amivit/following{/other_user}","gists_url":"https://api.github.com/users/amivit/gists{/gist_id}","starred_url":"https://api.github.com/users/amivit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amivit/subscriptions","organizations_url":"https://api.github.com/users/amivit/orgs","repos_url":"https://api.github.com/users/amivit/repos","events_url":"https://api.github.com/users/amivit/events{/privacy}","received_events_url":"https://api.github.com/users/amivit/received_events","type":"User","site_admin":false},"created_at":"2017-05-05T11:02:47Z","updated_at":"2017-05-05T11:02:47Z","body":"And the solution?"}}
{"actor":{"display_login":"amivit"}}