From 9f34d0c1a46695aa17f27bb84ec656fa78983402 Mon Sep 17 00:00:00 2001 From: Luis Mastrangelo Date: Fri, 25 Nov 2022 11:52:50 +0100 Subject: [PATCH 1/9] fix: remove `devtool` from production bundle --- webpack.prod.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.prod.js b/webpack.prod.js index 2539cbf..11044e1 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -3,7 +3,7 @@ const common = require('./webpack.common.js'); module.exports = merge(common, { mode: 'production', - devtool: 'eval', + devtool: false, optimization: { minimize: true, }, From 0d386ee42dcc6514a28ccc452cec51ab52895e07 Mon Sep 17 00:00:00 2001 From: Luis Mastrangelo Date: Fri, 25 Nov 2022 11:53:51 +0100 Subject: [PATCH 2/9] feat: build smoke package in core checks --- .github/workflows/core-ci-checks.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/core-ci-checks.yml b/.github/workflows/core-ci-checks.yml index ab57b87..ca3b185 100644 --- a/.github/workflows/core-ci-checks.yml +++ b/.github/workflows/core-ci-checks.yml @@ -27,3 +27,6 @@ jobs: - name: Tests run: yarn test:int + + - name: Package + run: yarn package From 9397f9b9b0eacb784064cc2a9ff52016ab1ea0c3 Mon Sep 17 00:00:00 2001 From: Luis Mastrangelo Date: Fri, 25 Nov 2022 12:14:32 +0100 Subject: [PATCH 3/9] fix: try to see if it works in CI --- webpack.prod.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.prod.js b/webpack.prod.js index 11044e1..2539cbf 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -3,7 +3,7 @@ const common = require('./webpack.common.js'); module.exports = merge(common, { mode: 'production', - devtool: false, + devtool: 'eval', optimization: { minimize: true, }, From 118fd1ceaf40994a07a0872a10f288d598f3a2cf Mon Sep 17 00:00:00 2001 From: Luis Mastrangelo Date: Fri, 25 Nov 2022 12:32:34 +0100 Subject: [PATCH 4/9] fix: try CI with increasing memory --- .github/workflows/core-ci-checks.yml | 4 +++- webpack.prod.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/core-ci-checks.yml b/.github/workflows/core-ci-checks.yml index ca3b185..1042d44 100644 --- a/.github/workflows/core-ci-checks.yml +++ b/.github/workflows/core-ci-checks.yml @@ -28,5 +28,7 @@ jobs: - name: Tests run: yarn test:int - - name: Package + - name: Build smoke check package run: yarn package + env: + NODE_OPTIONS: --max_old_space_size=4096 diff --git a/webpack.prod.js b/webpack.prod.js index 2539cbf..11044e1 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -3,7 +3,7 @@ const common = require('./webpack.common.js'); module.exports = merge(common, { mode: 'production', - devtool: 'eval', + devtool: false, optimization: { minimize: true, }, From 9641ea3a598cf271562a0cf23ffa6377d3a2b670 Mon Sep 17 00:00:00 2001 From: Luis Mastrangelo Date: Fri, 25 Nov 2022 12:49:35 +0100 Subject: [PATCH 5/9] chore: bump action versions to avoid CI warnings --- .github/workflows/core-ci-checks.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/core-ci-checks.yml b/.github/workflows/core-ci-checks.yml index 1042d44..b36b26b 100644 --- a/.github/workflows/core-ci-checks.yml +++ b/.github/workflows/core-ci-checks.yml @@ -8,10 +8,10 @@ jobs: runs-on: windows-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: lts/* cache: 'yarn' @@ -30,5 +30,5 @@ jobs: - name: Build smoke check package run: yarn package - env: - NODE_OPTIONS: --max_old_space_size=4096 + # env: + # NODE_OPTIONS: --max_old_space_size=4096 From acb3816cefef367054cc1f469e6058b5825246b9 Mon Sep 17 00:00:00 2001 From: Luis Mastrangelo Date: Fri, 25 Nov 2022 13:04:01 +0100 Subject: [PATCH 6/9] fix: restore memory increase to fix CI --- .github/workflows/core-ci-checks.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/core-ci-checks.yml b/.github/workflows/core-ci-checks.yml index b36b26b..2d5c919 100644 --- a/.github/workflows/core-ci-checks.yml +++ b/.github/workflows/core-ci-checks.yml @@ -28,7 +28,11 @@ jobs: - name: Tests run: yarn test:int + # Not sure why, but setting `devtool: false` in `webpack.prod.js` with no increased memory gives + # Error [ERR_WORKER_OUT_OF_MEMORY]: Worker terminated due to reaching memory limit: JS heap out of memory + # + # Increase memory with https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-megabytes - name: Build smoke check package run: yarn package - # env: - # NODE_OPTIONS: --max_old_space_size=4096 + env: + NODE_OPTIONS: --max_old_space_size=4096 From 89eceabae1da460d8d334af71700859e79c74b65 Mon Sep 17 00:00:00 2001 From: Luis Mastrangelo Date: Wed, 30 Nov 2022 10:05:43 -0300 Subject: [PATCH 7/9] chore: check whether it works in CI --- .github/workflows/core-ci-checks.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/core-ci-checks.yml b/.github/workflows/core-ci-checks.yml index 2d5c919..9ef37af 100644 --- a/.github/workflows/core-ci-checks.yml +++ b/.github/workflows/core-ci-checks.yml @@ -34,5 +34,5 @@ jobs: # Increase memory with https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-megabytes - name: Build smoke check package run: yarn package - env: - NODE_OPTIONS: --max_old_space_size=4096 + # env: + # NODE_OPTIONS: --max_old_space_size=4096 From f06cf77cc4ff2c2bbf53b884bc9e76f06c7a565a Mon Sep 17 00:00:00 2001 From: Luis Mastrangelo Date: Wed, 30 Nov 2022 10:27:39 -0300 Subject: [PATCH 8/9] docs: add comment about `devtool` option --- webpack.prod.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webpack.prod.js b/webpack.prod.js index 11044e1..7a3272b 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -3,6 +3,8 @@ const common = require('./webpack.common.js'); module.exports = merge(common, { mode: 'production', + // By removing source map generation, we reduce bundle size by 50%. + // See https://webpack.js.org/configuration/devtool/ for more details. devtool: false, optimization: { minimize: true, From 6c884df5107aeacf6d1fb5c476756ac50384a9c7 Mon Sep 17 00:00:00 2001 From: Luis Mastrangelo Date: Wed, 30 Nov 2022 10:38:05 -0300 Subject: [PATCH 9/9] docs: remove unused comments --- .github/workflows/core-ci-checks.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/core-ci-checks.yml b/.github/workflows/core-ci-checks.yml index 9ef37af..2ec15c9 100644 --- a/.github/workflows/core-ci-checks.yml +++ b/.github/workflows/core-ci-checks.yml @@ -28,11 +28,5 @@ jobs: - name: Tests run: yarn test:int - # Not sure why, but setting `devtool: false` in `webpack.prod.js` with no increased memory gives - # Error [ERR_WORKER_OUT_OF_MEMORY]: Worker terminated due to reaching memory limit: JS heap out of memory - # - # Increase memory with https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-megabytes - name: Build smoke check package run: yarn package - # env: - # NODE_OPTIONS: --max_old_space_size=4096