{"action":"created","issue":{"url":"https://api.github.com/repos/developit/microbundle/issues/181","repository_url":"https://api.github.com/repos/developit/microbundle","labels_url":"https://api.github.com/repos/developit/microbundle/issues/181/labels{/name}","comments_url":"https://api.github.com/repos/developit/microbundle/issues/181/comments","events_url":"https://api.github.com/repos/developit/microbundle/issues/181/events","html_url":"https://github.com/developit/microbundle/issues/181","id":346649386,"node_id":"MDU6SXNzdWUzNDY2NDkzODY=","number":181,"title":"Feature Request:  replace/define constants","user":{"login":"developit","id":105127,"node_id":"MDQ6VXNlcjEwNTEyNw==","avatar_url":"https://avatars2.githubusercontent.com/u/105127?v=4","gravatar_id":"","url":"https://api.github.com/users/developit","html_url":"https://github.com/developit","followers_url":"https://api.github.com/users/developit/followers","following_url":"https://api.github.com/users/developit/following{/other_user}","gists_url":"https://api.github.com/users/developit/gists{/gist_id}","starred_url":"https://api.github.com/users/developit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/developit/subscriptions","organizations_url":"https://api.github.com/users/developit/orgs","repos_url":"https://api.github.com/users/developit/repos","events_url":"https://api.github.com/users/developit/events{/privacy}","received_events_url":"https://api.github.com/users/developit/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-08-01T15:24:25Z","updated_at":"2018-08-01T19:28:20Z","closed_at":null,"author_association":"OWNER","body":"#### Usage:\r\n\r\n```\r\nmicrobundle --define NODE_ENV=production\r\n```\r\n\r\n#### Result:\r\n\r\ninput:\r\n\r\n```js\r\nif (NODE_ENV==='production') {\r\n  console.log('prod');\r\n}\r\nelse {\r\n  console.log('dev');\r\n}\r\n```\r\n\r\noutput with `--define NODE_ENV=production`:\r\n\r\n```js\r\nconsole.log('prod')\r\n```\r\n\r\nAll we have to do is use [rollup-plugin-replace](https://github.com/rollup/rollup-plugin-replace) to injec the value. Uglify handles the rest."},"comment":{"url":"https://api.github.com/repos/developit/microbundle/issues/comments/409693452","html_url":"https://github.com/developit/microbundle/issues/181#issuecomment-409693452","issue_url":"https://api.github.com/repos/developit/microbundle/issues/181","id":409693452,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTY5MzQ1Mg==","user":{"login":"developit","id":105127,"node_id":"MDQ6VXNlcjEwNTEyNw==","avatar_url":"https://avatars2.githubusercontent.com/u/105127?v=4","gravatar_id":"","url":"https://api.github.com/users/developit","html_url":"https://github.com/developit","followers_url":"https://api.github.com/users/developit/followers","following_url":"https://api.github.com/users/developit/following{/other_user}","gists_url":"https://api.github.com/users/developit/gists{/gist_id}","starred_url":"https://api.github.com/users/developit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/developit/subscriptions","organizations_url":"https://api.github.com/users/developit/orgs","repos_url":"https://api.github.com/users/developit/repos","events_url":"https://api.github.com/users/developit/events{/privacy}","received_events_url":"https://api.github.com/users/developit/received_events","type":"User","site_admin":false},"created_at":"2018-08-01T19:28:20Z","updated_at":"2018-08-01T19:28:20Z","author_association":"OWNER","body":"lol @ForsakenHarmony it was more of a \"what do y'all think of this?\" :P "}}
{"actor":{"display_login":"developit"}}