@@ -81,14 +81,14 @@ export function ALEPH({ initial }: {
81
81
setData ( data )
82
82
}
83
83
const onAddModule = async ( { moduleId, hash } : Module ) => {
84
- if ( moduleId === '. /404.js' ) {
84
+ if ( moduleId === '/404.js' ) {
85
85
const { default : Component } = await import ( getModuleImportUrl ( baseUrl , { moduleId, hash } ) + '?t=' + Date . now ( ) )
86
86
if ( util . isLikelyReactComponent ( Component ) ) {
87
87
setE404 ( { Component } )
88
88
} else {
89
89
setE404 ( { Component : E404Page } )
90
90
}
91
- } else if ( moduleId === '. /app.js' ) {
91
+ } else if ( moduleId === '/app.js' ) {
92
92
const { default : Component } = await import ( getModuleImportUrl ( baseUrl , { moduleId, hash } ) + '?t=' + Date . now ( ) )
93
93
if ( util . isLikelyReactComponent ( Component ) ) {
94
94
setApp ( { Component } )
@@ -98,11 +98,11 @@ export function ALEPH({ initial }: {
98
98
Component : E501App
99
99
} ) )
100
100
}
101
- } else if ( moduleId === '. /data.js' || moduleId === '. /data/index.js' ) {
101
+ } else if ( moduleId === '/data.js' || moduleId === '/data/index.js' ) {
102
102
const { default : data } = await import ( getModuleImportUrl ( baseUrl , { moduleId, hash } ) + '?t=' + Date . now ( ) )
103
103
console . log ( '[DATA]' , data )
104
104
setData ( data )
105
- } else if ( moduleId . startsWith ( '. /pages/' ) ) {
105
+ } else if ( moduleId . startsWith ( '/pages/' ) ) {
106
106
const pagePath = util . trimSuffix ( moduleId , '.js' ) . replace ( / \s + / g, '-' ) . replace ( / \/ ? i n d e x $ / i, '/' )
107
107
setPageModules ( pageModules => ( {
108
108
...pageModules ,
@@ -111,14 +111,14 @@ export function ALEPH({ initial }: {
111
111
}
112
112
}
113
113
const onRemoveModule = ( moduleId : string ) => {
114
- if ( moduleId === '. /404.js' ) {
114
+ if ( moduleId === '/404.js' ) {
115
115
setE404 ( { Component : E404Page } )
116
- } else if ( moduleId === '. /app.js' ) {
116
+ } else if ( moduleId === '/app.js' ) {
117
117
setApp ( { Component : null } )
118
- } else if ( moduleId === '. /data.js' || moduleId === '. /data/index.js' ) {
118
+ } else if ( moduleId === '/data.js' || moduleId === '/data/index.js' ) {
119
119
console . log ( '[DATA]' , { } )
120
120
setData ( { } )
121
- } else if ( moduleId . startsWith ( '. /pages/' ) ) {
121
+ } else if ( moduleId . startsWith ( '/pages/' ) ) {
122
122
setPageModules ( pageModules => {
123
123
const newPageModules : Record < string , { moduleId : string , hash : string } > = { }
124
124
for ( const pagePath in pageModules ) {
0 commit comments