Updates
This commit is contained in:
+10
-10
@@ -3,7 +3,7 @@ import _ from "lodash";
|
||||
import { log } from "../../../utils/log";
|
||||
import grabRootFilePath from "./grab-root-file-path";
|
||||
import grabPageCombinedServerRes from "./grab-page-combined-server-res";
|
||||
export default async function grabPageModules({ file_path, debug, url, query, routeParams, }) {
|
||||
export default async function grabPageModules({ file_path, debug, url, query, routeParams, skip_server_res, }) {
|
||||
const now = Date.now();
|
||||
const { root_file_path } = grabRootFilePath();
|
||||
const root_module = root_file_path
|
||||
@@ -13,17 +13,17 @@ export default async function grabPageModules({ file_path, debug, url, query, ro
|
||||
if (debug) {
|
||||
log.info(`module:`, module);
|
||||
}
|
||||
const { serverRes } = await grabPageCombinedServerRes({
|
||||
file_path,
|
||||
debug,
|
||||
query,
|
||||
routeParams,
|
||||
url,
|
||||
});
|
||||
const { serverRes } = skip_server_res
|
||||
? {}
|
||||
: await grabPageCombinedServerRes({
|
||||
file_path,
|
||||
debug,
|
||||
query,
|
||||
routeParams,
|
||||
url,
|
||||
});
|
||||
const { component } = (await grabPageBundledReactComponent({
|
||||
file_path,
|
||||
root_file_path,
|
||||
server_res: serverRes,
|
||||
})) || {};
|
||||
if (!component) {
|
||||
throw new Error(`Couldn't grab page component`);
|
||||
|
||||
Reference in New Issue
Block a user