Skip to content

Commit c4f5d0a

Browse files
committed
fix: disable rsbuild cache on arm64
Caching should be disabled on this platform until the following issue is resolved: web-infra-dev/rspack#10118
1 parent 57a71a0 commit c4f5d0a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tutormfe/templates/mfe/build/mfe/rsbuild.config.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const appName = parsedEnv.APP_ID || path.basename(currentDir).replace('frontend-
3131
const publicPath = parsedEnv.PUBLIC_PATH || '/' + appName + '/';
3232
const dev = parsedEnv.NODE_ENV === 'development';
3333
const prod = !dev;
34+
const isArm64 = (process.arch === 'arm64');
3435
parsedEnv.APP_ID = appName;
3536
parsedEnv.PUBLIC_PATH = publicPath;
3637
parsedEnv.MFE_CONFIG_API_URL = prod ? '/api/mfe_config/v1' : 'http://local.openedx.io:8000/api/mfe_config/v1';
@@ -65,9 +66,11 @@ const config = defineConfig({
6566
}
6667
},
6768
performance: {
68-
// We enable caching everywhere, even if it's unnecessary in some places. The
69-
// negative impact on performance should be minor.
70-
buildCache: true,
69+
// We enable caching everywhere except on amd64, even if it's unnecessary in
70+
// some places. The negative impact on performance should be minor.
71+
// The reason we disable it on arm64 is that build is failing on this platform
72+
// https://github.com/web-infra-dev/rspack/issues/10118
73+
buildCache: isArm64 ? false : true,
7174
},
7275
server: {
7376
base: publicPath,

0 commit comments

Comments
 (0)