Explorar o código

build: clear ts plugin cache before building for release

ref: #1591
Evan You %!s(int64=5) %!d(string=hai) anos
pai
achega
81e82e7d21
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      scripts/build.js

+ 4 - 0
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)