Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from codesandbox:master #237

Merged
merged 2 commits into from
Jun 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ aliases:
key: v17-prod-app-build-cache-{{ .Environment.CIRCLE_BRANCH }}-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ./packages/app/www
- ./packages/homepage/public
- ./packages/homepage/.cache

- &save_prod_cache
key: v17-prod-build-cache-{{ .Environment.CIRCLE_BRANCH }}-{{ .Environment.CIRCLE_SHA1 }}
Expand Down Expand Up @@ -112,7 +112,7 @@ commands:
description: 'Build the Application with `yarn build:prod`'
steps:
- restore_cache: *restore_repo_cache
# - restore_cache: *restore_prod_build_cache
- restore_cache: *restore_prod_build_cache
- run:
name: Build Application
command: yarn build:prod
Expand Down
7 changes: 7 additions & 0 deletions packages/homepage/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,13 @@ exports.onCreateWebpackConfig = ({
},
];

if (process.env.CIRCLECI && config.optimization) {
// eslint-disable-next-line no-console
console.log('Setting new parallel option for CircleCI');
// CircleCI has 32cpu cores, but only 2 for us. os.cpu().length gives back 32, which always results in OOM
config.optimization.minimizer[0].options.parallel = 2;
}

// This will completely replace the webpack config with the modified object.
actions.replaceWebpackConfig(config);
};