{"action":"created","issue":{"url":"https://api.github.com/repos/moment/moment/issues/2466","repository_url":"https://api.github.com/repos/moment/moment","labels_url":"https://api.github.com/repos/moment/moment/issues/2466/labels{/name}","comments_url":"https://api.github.com/repos/moment/moment/issues/2466/comments","events_url":"https://api.github.com/repos/moment/moment/issues/2466/events","html_url":"https://github.com/moment/moment/issues/2466","id":94033601,"number":2466,"title":"Circular dependency when using i18n via RequireJS?","user":{"login":"riddla","id":174157,"avatar_url":"https://avatars1.githubusercontent.com/u/174157?v=4","gravatar_id":"","url":"https://api.github.com/users/riddla","html_url":"https://github.com/riddla","followers_url":"https://api.github.com/users/riddla/followers","following_url":"https://api.github.com/users/riddla/following{/other_user}","gists_url":"https://api.github.com/users/riddla/gists{/gist_id}","starred_url":"https://api.github.com/users/riddla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riddla/subscriptions","organizations_url":"https://api.github.com/users/riddla/orgs","repos_url":"https://api.github.com/users/riddla/repos","events_url":"https://api.github.com/users/riddla/events{/privacy}","received_events_url":"https://api.github.com/users/riddla/received_events","type":"User","site_admin":false},"labels":[{"id":354796805,"url":"https://api.github.com/repos/moment/moment/labels/Loading","name":"Loading","color":"fef2c0","default":false},{"id":39331845,"url":"https://api.github.com/repos/moment/moment/labels/Troubleshooting","name":"Troubleshooting","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2015-07-09T12:21:33Z","updated_at":"2018-04-11T09:27:41Z","closed_at":null,"author_association":"NONE","body":"I`m having a problem that is mentioned in the comments of http://stackoverflow.com/a/17242839/341983: how do you load a 'translated' version of moment.js via RequireJS (correctly)?\n\n```\nrequire.config({\n    paths      : {\n        'moment'                : '../bower_components/moment/moment',\n        'momentDE'              : 'vendor/moment/locale/de'\n    },\n    shim       : {\n        'moment': ['momentDE']\n    }\n});\n\ndefine(function (require) {\n    var moment = require('moment');\n});\n```\n\nI ended up with a circular dependency when I set the localization as a dependency. (I guess the `moment` requirement within `de.js` causes this.)\n\nMy current workaround:\n\n```\nrequire.config({\n    paths      : {\n        'moment'                : '../bower_components/moment/moment',\n        'momentDE'              : 'vendor/moment/locale/de'\n    }\n});\n\ndefine(function (require) {\n    var moment = require('momentDE');\n});\n```\n\nI made a change within the locale file (`vendor/moment/locale/de.js`) to make this construct work. Instead of `return de` I use `return moment` to loop the moment object/library trough.\n\nIs there a better way?\n"},"comment":{"url":"https://api.github.com/repos/moment/moment/issues/comments/380388065","html_url":"https://github.com/moment/moment/issues/2466#issuecomment-380388065","issue_url":"https://api.github.com/repos/moment/moment/issues/2466","id":380388065,"user":{"login":"marwahaha","id":2541209,"avatar_url":"https://avatars0.githubusercontent.com/u/2541209?v=4","gravatar_id":"","url":"https://api.github.com/users/marwahaha","html_url":"https://github.com/marwahaha","followers_url":"https://api.github.com/users/marwahaha/followers","following_url":"https://api.github.com/users/marwahaha/following{/other_user}","gists_url":"https://api.github.com/users/marwahaha/gists{/gist_id}","starred_url":"https://api.github.com/users/marwahaha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marwahaha/subscriptions","organizations_url":"https://api.github.com/users/marwahaha/orgs","repos_url":"https://api.github.com/users/marwahaha/repos","events_url":"https://api.github.com/users/marwahaha/events{/privacy}","received_events_url":"https://api.github.com/users/marwahaha/received_events","type":"User","site_admin":false},"created_at":"2018-04-11T09:27:41Z","updated_at":"2018-04-11T09:27:41Z","author_association":"OWNER","body":"@riddla - do you still have this issue?"}}
{"actor":{"display_login":"marwahaha"}}