From b3caa1d9b059706c441bf81da6ab1c95f4138ce3 Mon Sep 17 00:00:00 2001 From: Supriya S Date: Wed, 26 May 2021 10:20:47 +0530 Subject: [PATCH 1/3] log env --- packages/react-scripts/bin/react-scripts.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-scripts/bin/react-scripts.js b/packages/react-scripts/bin/react-scripts.js index 09604f6a03f..2f3eac578cc 100755 --- a/packages/react-scripts/bin/react-scripts.js +++ b/packages/react-scripts/bin/react-scripts.js @@ -24,6 +24,8 @@ const scriptIndex = args.findIndex( const script = scriptIndex === -1 ? args[0] : args[scriptIndex]; const nodeArgs = scriptIndex > 0 ? args.slice(0, scriptIndex) : []; +console.log(process.env); + if (['build', 'eject', 'start', 'test'].includes(script)) { const result = spawn.sync( process.execPath, From 62c669bdab75ccbf4a2b0df57b8998725eb8c787 Mon Sep 17 00:00:00 2001 From: Supriya S Date: Wed, 26 May 2021 15:01:10 +0530 Subject: [PATCH 2/3] testing build --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 968d684fa08..831d58b807b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build +name: Testing Build on: [push] From 8e2b4bb99274a6d1fae11f9f8d25fac2bba5cf15 Mon Sep 17 00:00:00 2001 From: Supriya S Date: Wed, 26 May 2021 15:13:12 +0530 Subject: [PATCH 3/3] add asset compare plugin --- .github/workflows/build.yml | 2 ++ package.json | 1 + packages/react-scripts/bin/react-scripts.js | 2 -- packages/react-scripts/config/webpack.config.js | 4 ++++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 831d58b807b..f7caf7df5d4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,3 +23,5 @@ jobs: run: yarn --no-progress --non-interactive --no-lockfile - name: Build run: yarn build + env: + GITHUB_PERSONAL_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index a5c093bf32e..43c08aaea45 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "@testing-library/react": "^11.1.0", "@testing-library/user-event": "^12.1.10", "alex": "^8.2.0", + "asset-compare-git-webpack-plugin": "https://github.com/supriya-raj/asset-compare-git-webpack-plugin#948ea4be2398351ff2fab233e83fa0ff7c465a8f", "eslint": "^7.11.0", "execa": "1.0.0", "fs-extra": "^9.0.1", diff --git a/packages/react-scripts/bin/react-scripts.js b/packages/react-scripts/bin/react-scripts.js index 2f3eac578cc..09604f6a03f 100755 --- a/packages/react-scripts/bin/react-scripts.js +++ b/packages/react-scripts/bin/react-scripts.js @@ -24,8 +24,6 @@ const scriptIndex = args.findIndex( const script = scriptIndex === -1 ? args[0] : args[scriptIndex]; const nodeArgs = scriptIndex > 0 ? args.slice(0, scriptIndex) : []; -console.log(process.env); - if (['build', 'eject', 'start', 'test'].includes(script)) { const result = spawn.sync( process.execPath, diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index 5e5f87f3ce9..6c3c6ab1c39 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -8,6 +8,7 @@ // @remove-on-eject-end 'use strict'; +const AssetComparePlugin = require('asset-compare-git-webpack-plugin'); const fs = require('fs'); const path = require('path'); const webpack = require('webpack'); @@ -788,6 +789,9 @@ module.exports = function (webpackEnv) { }, }, }), + new AssetComparePlugin({ + gist_id: '3372502a4187b06e810e07f1b20b6d24', + }), ].filter(Boolean), // Some libraries import Node modules but don't use them in the browser. // Tell webpack to provide empty mocks for them so importing them works.