File tree Expand file tree Collapse file tree 1 file changed +2
-17
lines changed
packages/gatsby/src/utils/worker/child Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Original file line number Diff line number Diff line change 33import fs from "fs-extra"
44import Bluebird from "bluebird"
55import * as path from "path"
6- import { generateHtmlPath , fixedPagePath } from "gatsby-core-utils"
6+ import { generateHtmlPath } from "gatsby-core-utils"
77import { truncate } from "lodash"
88
99import {
1010 readWebpackStats ,
1111 getScriptsAndStylesForTemplate ,
1212 clearCache as clearAssetsMappingCache ,
1313} from "../../client-assets-for-template"
14- import type { IPageDataWithQueryResult } from "../../page-data"
14+ import { IPageDataWithQueryResult , readPageData } from "../../page-data"
1515import type { IRenderHtmlResult } from "../../../commands/build-html"
1616import {
1717 clearStaticQueryCaches ,
@@ -53,21 +53,6 @@ function clearCaches(): void {
5353 clearAssetsMappingCache ( )
5454}
5555
56- async function readPageData (
57- publicDir : string ,
58- pagePath : string
59- ) : Promise < IPageDataWithQueryResult > {
60- const filePath = join (
61- publicDir ,
62- `page-data` ,
63- fixedPagePath ( pagePath ) ,
64- `page-data.json`
65- )
66- const rawPageData = await fs . readFile ( filePath , `utf-8` )
67-
68- return JSON . parse ( rawPageData )
69- }
70-
7156async function doGetResourcesForTemplate (
7257 pageData : IPageDataWithQueryResult
7358) : Promise < IResourcesForTemplate > {
You can’t perform that action at this time.
0 commit comments