Skip to content

Commit 6251d6c

Browse files
Set cpu=1 in next.config.js (#1254)
* Set cpu=1 in next.config.js * Make cpu=1 a prod-only thing.
1 parent ef01f8e commit 6251d6c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

next.config.js

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
const IS_DEV = process.env.NODE_ENV === "development";
22

3+
const PROD_OPTIMIZATIONS = IS_DEV
4+
? {}
5+
: {
6+
experimental: {
7+
cpus: 1,
8+
},
9+
};
10+
311
// IMPORTANT: Keep this in sync with netlify.toml
412
// prettier-ignore
513
const CSP_HEADER = [
@@ -75,6 +83,8 @@ const CSP_HEADER = [
7583
module.exports = {
7684
output: "export",
7785

86+
...PROD_OPTIMIZATIONS,
87+
7888
webpack: (configuration) => {
7989
// Don't try to polyfill the fs module.
8090
configuration.resolve.fallback = { fs: false };

0 commit comments

Comments
 (0)