@@ -81,14 +81,14 @@ export function ALEPH({ initial }: {
8181 setData ( data )
8282 }
8383 const onAddModule = async ( { moduleId, hash } : Module ) => {
84- if ( moduleId === '. /404.js' ) {
84+ if ( moduleId === '/404.js' ) {
8585 const { default : Component } = await import ( getModuleImportUrl ( baseUrl , { moduleId, hash } ) + '?t=' + Date . now ( ) )
8686 if ( util . isLikelyReactComponent ( Component ) ) {
8787 setE404 ( { Component } )
8888 } else {
8989 setE404 ( { Component : E404Page } )
9090 }
91- } else if ( moduleId === '. /app.js' ) {
91+ } else if ( moduleId === '/app.js' ) {
9292 const { default : Component } = await import ( getModuleImportUrl ( baseUrl , { moduleId, hash } ) + '?t=' + Date . now ( ) )
9393 if ( util . isLikelyReactComponent ( Component ) ) {
9494 setApp ( { Component } )
@@ -98,11 +98,11 @@ export function ALEPH({ initial }: {
9898 Component : E501App
9999 } ) )
100100 }
101- } else if ( moduleId === '. /data.js' || moduleId === '. /data/index.js' ) {
101+ } else if ( moduleId === '/data.js' || moduleId === '/data/index.js' ) {
102102 const { default : data } = await import ( getModuleImportUrl ( baseUrl , { moduleId, hash } ) + '?t=' + Date . now ( ) )
103103 console . log ( '[DATA]' , data )
104104 setData ( data )
105- } else if ( moduleId . startsWith ( '. /pages/' ) ) {
105+ } else if ( moduleId . startsWith ( '/pages/' ) ) {
106106 const pagePath = util . trimSuffix ( moduleId , '.js' ) . replace ( / \s + / g, '-' ) . replace ( / \/ ? i n d e x $ / i, '/' )
107107 setPageModules ( pageModules => ( {
108108 ...pageModules ,
@@ -111,14 +111,14 @@ export function ALEPH({ initial }: {
111111 }
112112 }
113113 const onRemoveModule = ( moduleId : string ) => {
114- if ( moduleId === '. /404.js' ) {
114+ if ( moduleId === '/404.js' ) {
115115 setE404 ( { Component : E404Page } )
116- } else if ( moduleId === '. /app.js' ) {
116+ } else if ( moduleId === '/app.js' ) {
117117 setApp ( { Component : null } )
118- } else if ( moduleId === '. /data.js' || moduleId === '. /data/index.js' ) {
118+ } else if ( moduleId === '/data.js' || moduleId === '/data/index.js' ) {
119119 console . log ( '[DATA]' , { } )
120120 setData ( { } )
121- } else if ( moduleId . startsWith ( '. /pages/' ) ) {
121+ } else if ( moduleId . startsWith ( '/pages/' ) ) {
122122 setPageModules ( pageModules => {
123123 const newPageModules : Record < string , { moduleId : string , hash : string } > = { }
124124 for ( const pagePath in pageModules ) {
0 commit comments