Conversation
|
By analyzing the blame information on this pull request, we identified @drew-gross, @flovilmart and @hallucinogen to be potential reviewers. |
| "webpack": "~1.12.0" | ||
| }, | ||
| "devDependencies": { | ||
| "history": "~1.9.1", |
There was a problem hiding this comment.
history should not be dev I believe
|
While this looks really good, that makes all those dependencies get installed while you use NPM, which is something we obviously want to avoid as we distribute the package with solely the right folders. also, npm would fetch the devDependencies if NPM_CONFIG_PRODUCTION=false. I believe heroku sets NPM_CONFIG_PRODUCTION=true by default, removing it, would let all devDependencies to be downloaded, therefore you would be able to build on deploy, without impacting the uses using npm |
| "test": "NODE_PATH=./node_modules jest", | ||
| "generate": "node scripts/generate.js", | ||
| "prepublish": "webpack --config webpack/publish.config.js --progress", | ||
| "postinstall": "if [ -n \"$POST_INSTALL_BUILD\" ]; then npm run dist; fi", |
There was a problem hiding this comment.
you could use: "heroku-postbuild" (as described here)
|
@flovilmart Yea, some of those deps might just be copy/pasta errors. So is the general approach to not specify a |
|
I was mistaken about NODE_ENV, this is actually to sum up:
And that's it'! |
|
Ahh, gotcha. Heh, I actually didn't even realize Hunter added the |
|
testing right now but that seem fine the post build may not even be needed as prepublish will be run after npm install by npm itself and bundles the package by itself So that sums it up by usr setting |
|
Yea, the problem was that it compiled everything, but didn't move/symlink it to |
|
yes prepublish runs, now I have a trouble with heroku, will keep you posted |
|
Ok, so it's all great, but we need to remove --progress in prepublish so it don't break on heroku. |
|
@mnoble I've remove the --progress that was making heroku build fail. So now the only thing to do I believe is to set the heroku env and you're good to go! |
Moves all build deps to
dependencies(opposed todevDependencies) so that the project can be built when deploying to production (like on Heroku, in this case). You enable this by setting thePOST_INSTALL_BUILD.Also fixes an issue introduced after splitting up the backend/static express apps where
allowInsecureHTTPwas being referenced while never being defined.