memoryConfig.js 264 B

1234567891011
  1. const os = require('os')
  2. const totalMem = os.totalmem()
  3. const percentage = 0.375
  4. module.exports = (config) => {
  5. config.plugin('fork-ts-checker').tap((args) => {
  6. args[0].memoryLimit = Math.floor((totalMem / 1024 / 1024) * percentage)
  7. return args
  8. })
  9. }