From 0bdddfd43b45e4a7cb2a7d7c90e5eb005b2e317d Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Tue, 9 Jun 2020 12:46:58 +0300 Subject: [PATCH] build: increase webpack memory (#3878) * build: increase webpack memory * ci: update cache utility --- .github/workflows/nodejs.yml | 6 +++--- .github/workflows/publish.yml | 2 +- packages/netlify-cms-app/package.json | 3 ++- packages/netlify-cms-core/package.json | 3 ++- packages/netlify-cms/package.json | 3 ++- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 2934db89..3278317e 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -33,7 +33,7 @@ jobs: - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v1 + - uses: actions/cache@v2 with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }} @@ -77,7 +77,7 @@ jobs: - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v1 + - uses: actions/cache@v2 with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }} @@ -118,7 +118,7 @@ jobs: - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v1 + - uses: actions/cache@v2 with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index eb7ad9d0..0200647e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -33,7 +33,7 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - - uses: actions/cache@v1 + - uses: actions/cache@v2 with: path: ~/.cache/yarn key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }} diff --git a/packages/netlify-cms-app/package.json b/packages/netlify-cms-app/package.json index 88504ae3..916fdd1c 100644 --- a/packages/netlify-cms-app/package.json +++ b/packages/netlify-cms-app/package.json @@ -14,7 +14,8 @@ "types": "index.d.ts", "scripts": { "develop": "yarn build:esm --watch", - "build": "cross-env NODE_ENV=production webpack", + "webpack": "node --max_old_space_size=4096 ../../node_modules/webpack/bin/webpack.js", + "build": "cross-env NODE_ENV=production run-s webpack", "build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward" }, "keywords": [ diff --git a/packages/netlify-cms-core/package.json b/packages/netlify-cms-core/package.json index 133418a3..380f3767 100644 --- a/packages/netlify-cms-core/package.json +++ b/packages/netlify-cms-core/package.json @@ -14,7 +14,8 @@ "types": "index.d.ts", "scripts": { "develop": "yarn build:esm --watch", - "build": "cross-env NODE_ENV=production webpack", + "webpack": "node --max_old_space_size=4096 ../../node_modules/webpack/bin/webpack.js", + "build": "cross-env NODE_ENV=production run-s webpack", "build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward --extensions \".js,.jsx,.ts,.tsx\"" }, "keywords": [ diff --git a/packages/netlify-cms/package.json b/packages/netlify-cms/package.json index 080d4c07..c6b44375 100644 --- a/packages/netlify-cms/package.json +++ b/packages/netlify-cms/package.json @@ -7,7 +7,8 @@ "bugs": "https://github.com/netlify/netlify-cms/issues", "main": "dist/netlify-cms.js", "scripts": { - "build": "cross-env NODE_ENV=production webpack", + "webpack": "node --max_old_space_size=4096 ../../node_modules/webpack/bin/webpack.js", + "build": "cross-env NODE_ENV=production run-s webpack", "build-preview": "cross-env NODE_ENV=production webpack-dev-server --open", "develop": "webpack-dev-server --hot" },