Closed Unesdala closed 3 years ago
@Unesdala are you going to fix this? No we don't use mutiple .env files, that is incorrect, you need to update the build scripts to work with the newer webpack config then, please do that or let me know if you are not able to fix and I will do this instead, thank you
@JoshuaVSherman I tinkered around with it, but couldn't get it working quite right. If you get some time can you finish it up?
@Unesdala since this is not my area of expertise, I would estimate it would take me a good 4 hours to figure out and fix. I am not available right now to work on this, so I am going to move it to the backlog and you can work on something else if you wish. I would also recommend that you post on Stackoverflow and use the Gitter developer chat to find an expert on webpack who could help you (which is what I would probably do if I were working on this ticket)
Code Climate has analyzed commit ee542449 and detected 0 issues on this pull request.
The test coverage on the diff in this pull request is 100.0% (50% is the threshold).
This pull request will bring the total coverage in the repository to 99.4% (0.0% change).
View more on Code Climate.
@JoshuaVSherman - Yeah, it's looking at your .env file, which I'm guessing is set to development. By default, yarn start build runs webpack.production. Which would have the NODE_ENV be wrong, since it's looking for production.
We could split the webpack config into dev/production/common/config, and have it build based on that, and then have two .env files (For production/development), albeit, that would require a fair bit of rewriting code.
That, or if you know how to get nps scripts to run webpack.development when we're doing local work, and have yarn start build be based on that (Like build:dev, or something like that), that would solve the issue for that.
Just changing the build scripts would be faster. The way we have webpack setup right now should be changing it up based on whether it's running a build for development or production as is - it's just that nps is defaulting to production when building. And I've no clue how to set it up to be able to pass in for development vs production.