{"action":"closed","issue":{"url":"https://api.github.com/repos/rails/webpacker/issues/1429","repository_url":"https://api.github.com/repos/rails/webpacker","labels_url":"https://api.github.com/repos/rails/webpacker/issues/1429/labels{/name}","comments_url":"https://api.github.com/repos/rails/webpacker/issues/1429/comments","events_url":"https://api.github.com/repos/rails/webpacker/issues/1429/events","html_url":"https://github.com/rails/webpacker/issues/1429","id":314227482,"number":1429,"title":"running webpack when NODE_ENV=test","user":{"login":"ciampam9","id":3652680,"avatar_url":"https://avatars0.githubusercontent.com/u/3652680?v=4","gravatar_id":"","url":"https://api.github.com/users/ciampam9","html_url":"https://github.com/ciampam9","followers_url":"https://api.github.com/users/ciampam9/followers","following_url":"https://api.github.com/users/ciampam9/following{/other_user}","gists_url":"https://api.github.com/users/ciampam9/gists{/gist_id}","starred_url":"https://api.github.com/users/ciampam9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciampam9/subscriptions","organizations_url":"https://api.github.com/users/ciampam9/orgs","repos_url":"https://api.github.com/users/ciampam9/repos","events_url":"https://api.github.com/users/ciampam9/events{/privacy}","received_events_url":"https://api.github.com/users/ciampam9/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-13T19:38:49Z","updated_at":"2018-04-16T22:43:48Z","closed_at":"2018-04-16T22:43:48Z","author_association":"NONE","body":"👋 Hey all!\r\n\r\nIs there a reason why we're not allowing webpack to run `environment/test.js`?  It seems as though when running `NODE_ENV=test ./bin/webpack`, the `nodeEnv` in `package/env.js` is being overridden to `production`.\r\n\r\nCurrently, if the node env isn't a part of the whitelist (package/env.js):\r\n```js\r\nconst NODE_ENVIRONMENTS = ['development', 'production']\r\nconst DEFAULT = 'production'\r\n```\r\n\r\nit defaults to `production` (package/env.js):\r\n```js\r\nmodule.exports = {\r\n  railsEnv: railsEnv && railsEnv.match(regex) ? railsEnv : DEFAULT,\r\n  nodeEnv: nodeEnv && NODE_ENVIRONMENTS.includes(nodeEnv) ? nodeEnv : DEFAULT\r\n}\r\n```\r\n\r\nWould it be possible to whitelist test as well? If the package has a specific test environment we should be allowed to use it by setting the node env, imo.\r\n\r\n\r\nI realize this is outlined in the docs but why would we still have a `package/environments/test.js` file if you cannot run it?\r\n"}}
{"actor":{"display_login":"ciampam9"}}