File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -248,7 +248,12 @@ class CodeInjector implements ICodeInjector {
248248 }
249249 } ) ) ;
250250 }
251-
251+ async migrateLegacyCustomLayout ( oldMeta ) {
252+ if ( oldMeta . customLayout === true ) {
253+ oldMeta . sidebarAndHeader = "none" ;
254+ }
255+ return oldMeta ;
256+ }
252257 async prepareSources ( ) {
253258 // collects all files and folders into SPA_TMP_DIR
254259
@@ -315,14 +320,15 @@ class CodeInjector implements ICodeInjector {
315320 } ;
316321 const registerCustomPages = ( config ) => {
317322 if ( config . customization . customPages ) {
318- config . customization . customPages . forEach ( ( page ) => {
323+ config . customization . customPages . forEach ( async ( page ) => {
324+ const newMeta = await this . migrateLegacyCustomLayout ( page ?. component ?. meta || { } ) ;
319325 routes += `{
320326 path: '${ page . path } ',
321327 name: '${ page . path } ',
322328 component: () => import('${ page ?. component ?. file || page . component } '),
323329 meta: ${
324330 JSON . stringify ( {
325- ...( page ?. component ?. meta || { } ) ,
331+ ...newMeta ,
326332 title : page . meta ?. title || page . path . replace ( '/' , '' )
327333 } )
328334 }
You can’t perform that action at this time.
0 commit comments