mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-13 17:17:28 +02:00
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:
parent
e04c8f140f
commit
639d8d3eac
8 changed files with 107 additions and 42 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue