App structure
I've got an app that's being deployed to Heroku. The folder structure looks like this:
- package.json // package.json for my backend.
- node_modules // My Express API node modules
- index.js // My Express API code
- client
-- package.json // package.json for my React-based frontend
-- ... folders from create-react-app
My backend package.json
takes care of building the create-react-app
frontend, by performing build
command:
"build": "cd ./client && npm install && npm run build"
I've modified my frontend package.json
as stated in this github issue comment.
Everything seems to run fine, but then Heroku complains about exceeding maximum slug size (500mb).
My question
Can I somehow improve this configuration so the slug size stays under the limit? Seems like installing the puppeteer and chrome buildpacks takes a lot of slug space – can this be somehow minimized?