diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e568561d64..d6d136b77b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,9 +2,9 @@ name: Build on: push: - branches: [fork_cra5] + branches: [main] pull_request: - branches: [fork_cra5] + branches: [main] jobs: build: diff --git a/packages/react-scripts/config/paths.js b/packages/react-scripts/config/paths.js index f716fa2da2..4bf961e6b4 100644 --- a/packages/react-scripts/config/paths.js +++ b/packages/react-scripts/config/paths.js @@ -77,7 +77,7 @@ module.exports = { testsSetup: resolveModule(resolveApp, 'src/setupTests'), proxySetup: resolveApp('src/setupProxy.js'), appNodeModules: resolveApp('node_modules'), - appWebpackCache: resolveApp('node_modules/.cache'), + appWebpackCache: resolveApp('node_modules/.cache/webpack'), appTsBuildInfoFile: resolveApp('node_modules/.cache/tsconfig.tsbuildinfo'), swSrc: resolveModule(resolveApp, 'src/service-worker'), publicUrlOrPath, @@ -105,7 +105,7 @@ module.exports = { testsSetup: resolveModule(resolveApp, 'src/setupTests'), proxySetup: resolveApp('src/setupProxy.js'), appNodeModules: resolveApp('node_modules'), - appWebpackCache: resolveApp('node_modules/.cache'), + appWebpackCache: resolveApp('node_modules/.cache/webpack'), appTsBuildInfoFile: resolveApp('node_modules/.cache/tsconfig.tsbuildinfo'), swSrc: resolveModule(resolveApp, 'src/service-worker'), publicUrlOrPath, @@ -146,7 +146,7 @@ if ( testsSetup: resolveModule(resolveOwn, `${templatePath}/src/setupTests`), proxySetup: resolveOwn(`${templatePath}/src/setupProxy.js`), appNodeModules: resolveOwn('node_modules'), - appWebpackCache: resolveOwn('node_modules/.cache'), + appWebpackCache: resolveOwn('node_modules/.cache/webpack'), appTsBuildInfoFile: resolveOwn('node_modules/.cache/tsconfig.tsbuildinfo'), swSrc: resolveModule(resolveOwn, `${templatePath}/src/service-worker`), publicUrlOrPath, diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index beaec410ea..2e21bb0e5b 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -244,6 +244,7 @@ module.exports = function (webpackEnv) { }, cache: { type: 'filesystem', + name: 'WebappCache', version: createEnvironmentHash(env.raw), cacheDirectory: paths.appWebpackCache, store: 'pack', diff --git a/packages/react-scripts/config/webpack.config.ssr.js b/packages/react-scripts/config/webpack.config.ssr.js index 199c763c3c..05b25d7ea4 100644 --- a/packages/react-scripts/config/webpack.config.ssr.js +++ b/packages/react-scripts/config/webpack.config.ssr.js @@ -252,6 +252,7 @@ module.exports = function (webpackEnv) { }, cache: { type: 'filesystem', + name: 'SsrCache', version: createEnvironmentHash(env.raw), cacheDirectory: paths.appWebpackCache, store: 'pack',