{"action":"opened","issue":{"url":"https://api.github.com/repos/zalando/tailor/issues/89","repository_url":"https://api.github.com/repos/zalando/tailor","labels_url":"https://api.github.com/repos/zalando/tailor/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/zalando/tailor/issues/89/comments","events_url":"https://api.github.com/repos/zalando/tailor/issues/89/events","html_url":"https://github.com/zalando/tailor/issues/89","id":196295740,"number":89,"title":"Custom Require.","user":{"login":"SimeonC","id":1085899,"avatar_url":"https://avatars.githubusercontent.com/u/1085899?v=3","gravatar_id":"","url":"https://api.github.com/users/SimeonC","html_url":"https://github.com/SimeonC","followers_url":"https://api.github.com/users/SimeonC/followers","following_url":"https://api.github.com/users/SimeonC/following{/other_user}","gists_url":"https://api.github.com/users/SimeonC/gists{/gist_id}","starred_url":"https://api.github.com/users/SimeonC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimeonC/subscriptions","organizations_url":"https://api.github.com/users/SimeonC/orgs","repos_url":"https://api.github.com/users/SimeonC/repos","events_url":"https://api.github.com/users/SimeonC/events{/privacy}","received_events_url":"https://api.github.com/users/SimeonC/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-18T19:57:08Z","updated_at":"2016-12-18T19:57:08Z","closed_at":null,"body":"I'm currently using tailor with webpack which means I'm not using require as it's supposed to work. Basically, I'm just using it to load the file if it isn't already loaded. My problem is that the \"require\" variable is causing conflicts. Would it be possible to have an option to change the \"require\" variable here: https://github.com/zalando/tailor/blob/ffe52cafe0a5b47daf4ad773037e8b9fae5d54e2/index.js#L34\r\n\r\nI've replaced the line with: `return new Buffer(memoizedDefinition + `${pipeInstanceName} = new Pipe(${options.amdLoaderName || 'require'})</script>\\n`);`\r\n\r\nMy amd loader file for reference:\r\n\r\n```\r\n(function (window, undefined) {\r\n\tlet loaded = {};\r\n\tfunction loadModule(src, el) {\r\n        // need to add new script to the browser\r\n        el = window.document.createElement('script');\r\n        el.src = src;\r\n        window.document.head.appendChild(el);\r\n    }\r\n    \r\n\tfunction req(dependencyNames) {\r\n\t\tif (!loaded[dependencyNames[0]]) {\r\n\t\t\tloaded[dependencyNames[0]] = true;\r\n\t\t\tloadModule(dependencyNames[0]);\r\n\t\t}\r\n    }\r\n\twindow['tailor_require'] = req;\r\n}(this));\r\n```"}}
{"actor":{"display_login":"SimeonC"}}