diff --git a/scripts/build.js b/scripts/build.js index 32d091ee..f3a66051 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -36,6 +36,10 @@ const commit = execa.sync('git', ['rev-parse', 'HEAD']).stdout.slice(0, 7) run() async function run() { + if (isRelease) { + // remove build cache for release builds to avoid outdated enum values + await fs.remove(path.resolve(__dirname, '../node_modules/.rts2_cache')) + } if (!targets.length) { await buildAll(allTargets) checkAllSizes(allTargets)