{"action":"created","issue":{"url":"https://api.github.com/repos/fuse-box/fuse-box/issues/551","repository_url":"https://api.github.com/repos/fuse-box/fuse-box","labels_url":"https://api.github.com/repos/fuse-box/fuse-box/issues/551/labels{/name}","comments_url":"https://api.github.com/repos/fuse-box/fuse-box/issues/551/comments","events_url":"https://api.github.com/repos/fuse-box/fuse-box/issues/551/events","html_url":"https://github.com/fuse-box/fuse-box/issues/551","id":229939608,"number":551,"title":"Webpacket DefinePlugin Like Plugin ?","user":{"login":"hilarycheng","id":65493,"avatar_url":"https://avatars3.githubusercontent.com/u/65493?v=4","gravatar_id":"","url":"https://api.github.com/users/hilarycheng","html_url":"https://github.com/hilarycheng","followers_url":"https://api.github.com/users/hilarycheng/followers","following_url":"https://api.github.com/users/hilarycheng/following{/other_user}","gists_url":"https://api.github.com/users/hilarycheng/gists{/gist_id}","starred_url":"https://api.github.com/users/hilarycheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hilarycheng/subscriptions","organizations_url":"https://api.github.com/users/hilarycheng/orgs","repos_url":"https://api.github.com/users/hilarycheng/repos","events_url":"https://api.github.com/users/hilarycheng/events{/privacy}","received_events_url":"https://api.github.com/users/hilarycheng/received_events","type":"User","site_admin":false},"labels":[{"id":507187716,"url":"https://api.github.com/repos/fuse-box/fuse-box/labels/discussion","name":"discussion","color":"fef2c0","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-05-19T10:49:49Z","updated_at":"2018-03-28T00:23:36Z","closed_at":"2017-05-19T14:44:55Z","author_association":"NONE","body":"I am migrating my project from webpack to fuse-box 2.0. I found a problem that I cannot find a DefinePlugin like replacement.\r\n\r\nI have tried the following methods:\r\n1. globals setup. \r\n2. EnvPlugin\r\n3. ReplacePlugin\r\n\r\nall these plugins cannot replace/define a constants inside React JSX files.\r\n\r\nIs there any way to do it ?"},"comment":{"url":"https://api.github.com/repos/fuse-box/fuse-box/issues/comments/376718327","html_url":"https://github.com/fuse-box/fuse-box/issues/551#issuecomment-376718327","issue_url":"https://api.github.com/repos/fuse-box/fuse-box/issues/551","id":376718327,"user":{"login":"pmonty","id":7111292,"avatar_url":"https://avatars2.githubusercontent.com/u/7111292?v=4","gravatar_id":"","url":"https://api.github.com/users/pmonty","html_url":"https://github.com/pmonty","followers_url":"https://api.github.com/users/pmonty/followers","following_url":"https://api.github.com/users/pmonty/following{/other_user}","gists_url":"https://api.github.com/users/pmonty/gists{/gist_id}","starred_url":"https://api.github.com/users/pmonty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmonty/subscriptions","organizations_url":"https://api.github.com/users/pmonty/orgs","repos_url":"https://api.github.com/users/pmonty/repos","events_url":"https://api.github.com/users/pmonty/events{/privacy}","received_events_url":"https://api.github.com/users/pmonty/received_events","type":"User","site_admin":false},"created_at":"2018-03-28T00:23:36Z","updated_at":"2018-03-28T00:23:36Z","author_association":"NONE","body":"Would be nice if there was a plugin like Webpack's Define Plugin that doesn't attach the variables to `process.env.[variablename]` and instead can be its own variable.\r\n\r\nHow we did it before we moved to FuseBox was define them:\r\n```\r\nplugins.push(new webpack.DefinePlugin({\r\n    API: JSON.stringify(API),\r\n    TEST: \"test\"\r\n}));\r\n```\r\n\r\nand then in a react component for example if it was needed:\r\n```\r\ndeclare var TEST: any;\r\nconsole.log(TEST);\r\n```"}}
{"actor":{"display_login":"pmonty"}}