perf(v2): skip runtime fileHash cache in prod & get timestamp asynchronously (#1951)

* skip hash calculation in prod when generating file

* perf: convert lastUpdated to be async process

* changelog
This commit is contained in:
Endi 2019-11-08 23:35:39 +07:00 committed by GitHub
parent e04c8f140f
commit 639d8d3eac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 107 additions and 42 deletions

View file

@ -112,7 +112,7 @@ export default async function processMetadata({
// Use fake data in dev for faster development
const fileLastUpdateData =
process.env.NODE_ENV === 'production'
? lastUpdate(filePath)
? await lastUpdate(filePath)
: {
author: 'Author',
timestamp: '1539502055',