@@ -330,18 +330,18 @@ const queue = {
330330 . loadPage ( rawPath )
331331 . then ( result =>
332332 result === null && rawPath !== `/404.html`
333- ? queue . getPage ( `/404.html` )
333+ ? queue . loadPageSync ( `/404.html` )
334334 : null
335335 ) ,
336336
337- getPage : rawPath => pathScriptsCache [ cleanAndFindPath ( rawPath ) ] ,
337+ loadPageSync : rawPath => pathScriptsCache [ cleanAndFindPath ( rawPath ) ] ,
338338
339- getPageOr404 : rawPath => {
340- const page = queue . getPage ( rawPath )
339+ loadPageOr404Sync : rawPath => {
340+ const page = queue . loadPageSync ( rawPath )
341341 if ( page ) {
342342 return page
343343 } else if ( rawPath !== `/404.html` ) {
344- return queue . getPage ( `/404.html` )
344+ return queue . loadPageSync ( `/404.html` )
345345 } else {
346346 return null
347347 }
@@ -352,7 +352,7 @@ const queue = {
352352 // already loaded into the browser by the time this function is
353353 // called. Use the resource URLs passed in `onPostPrefetch` instead.
354354 getResourceURLsForPathname : path => {
355- const pageData = queue . getPage ( path )
355+ const pageData = queue . loadPageSync ( path )
356356 if ( pageData ) {
357357 return createComponentUrls ( pageData . componentChunkName )
358358 } else {
@@ -382,9 +382,9 @@ export const publicLoader = {
382382 } ,
383383 getResourcesForPathnameSync : rawPath => {
384384 console . warn (
385- `Warning: getResourcesForPathnameSync is deprecated. Use getPage instead`
385+ `Warning: getResourcesForPathnameSync is deprecated. Use loadPageSync instead`
386386 )
387- return queue . getPage ( rawPath )
387+ return queue . loadPageSync ( rawPath )
388388 } ,
389389 getResourceURLsForPathname : pathname => {
390390 console . warn (
@@ -395,8 +395,8 @@ export const publicLoader = {
395395
396396 // Real methods
397397 loadPage : queue . loadPage ,
398- getPage : queue . getPage ,
399- getPageOr404 : queue . getPageOr404 ,
398+ loadPageSync : queue . loadPageSync ,
399+ loadPageOr404Sync : queue . loadPageOr404Sync ,
400400}
401401
402402export default queue
0 commit comments