{"action":"created","issue":{"url":"https://api.github.com/repos/wix/react-templates/issues/185","repository_url":"https://api.github.com/repos/wix/react-templates","labels_url":"https://api.github.com/repos/wix/react-templates/issues/185/labels{/name}","comments_url":"https://api.github.com/repos/wix/react-templates/issues/185/comments","events_url":"https://api.github.com/repos/wix/react-templates/issues/185/events","html_url":"https://github.com/wix/react-templates/issues/185","id":173075212,"number":185,"title":"rt-src for asset compilation","user":{"login":"Arbolista","id":3526083,"avatar_url":"https://avatars.githubusercontent.com/u/3526083?v=3","gravatar_id":"","url":"https://api.github.com/users/Arbolista","html_url":"https://github.com/Arbolista","followers_url":"https://api.github.com/users/Arbolista/followers","following_url":"https://api.github.com/users/Arbolista/following{/other_user}","gists_url":"https://api.github.com/users/Arbolista/gists{/gist_id}","starred_url":"https://api.github.com/users/Arbolista/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arbolista/subscriptions","organizations_url":"https://api.github.com/users/Arbolista/orgs","repos_url":"https://api.github.com/users/Arbolista/repos","events_url":"https://api.github.com/users/Arbolista/events{/privacy}","received_events_url":"https://api.github.com/users/Arbolista/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-24T22:42:05Z","updated_at":"2016-08-25T11:10:45Z","closed_at":null,"body":"I've got a project, where we've developed all of our img sources to use a local development server, but in production, we are going to need a CDN.\r\n\r\nAll of our compiled assets are currently compiled through webpack - it would be easiest if we could compile all of our img src's through Webpack as well (possibly link href and script src as well).\r\n\r\nI'm wondering how amenable you be to this sort of compilation - maybe it's your opinion that this should happen within the template rather than in the compiler (`<img src=\"{require('assets/img/question.png')}\"/>`. I wouldn't disagree, but would argue that there is some convenience below.\r\n\r\nI'm definitely willing to open a PR for `rt-src`, but before going down a rabbit whole, I wanted to get opinion on whether this would be something you would be open to merging and if anyone had an opinion on API.\r\n\r\n```html\r\n<img rt-src=\"'assets/img/question.png'\"/> \r\n<img rt-src=\"this.current_status_icon\"/> \r\n```\r\n\r\n```js\r\nReact.createElement('img', {\r\n        'src': require('assets/img/question.png')\r\n    })\r\nReact.createElement('img', {\r\n        'src': require(this.current_status_icon)\r\n    })\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/wix/react-templates/issues/comments/242351639","html_url":"https://github.com/wix/react-templates/issues/185#issuecomment-242351639","issue_url":"https://api.github.com/repos/wix/react-templates/issues/185","id":242351639,"user":{"login":"nippur72","id":2598443,"avatar_url":"https://avatars.githubusercontent.com/u/2598443?v=3","gravatar_id":"","url":"https://api.github.com/users/nippur72","html_url":"https://github.com/nippur72","followers_url":"https://api.github.com/users/nippur72/followers","following_url":"https://api.github.com/users/nippur72/following{/other_user}","gists_url":"https://api.github.com/users/nippur72/gists{/gist_id}","starred_url":"https://api.github.com/users/nippur72/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nippur72/subscriptions","organizations_url":"https://api.github.com/users/nippur72/orgs","repos_url":"https://api.github.com/users/nippur72/repos","events_url":"https://api.github.com/users/nippur72/events{/privacy}","received_events_url":"https://api.github.com/users/nippur72/received_events","type":"User","site_admin":false},"created_at":"2016-08-25T11:10:45Z","updated_at":"2016-08-25T11:10:45Z","body":"Update: I managed to publish the configurable webpack-loader I was working on, it's named [react-templates-preprocess-loader](https://github.com/nippur72/react-templates-preprocess-loader).\r\n\r\nFor your use case, look at the example in the README. \r\n\r\n"}}
{"actor":{"display_login":"nippur72"}}