@@ -159,7 +159,7 @@ export default class Project {
159
159
if ( path ) {
160
160
const importPath = '.' + path + '.js'
161
161
if ( this . #modules. has ( importPath ) ) {
162
- const { default : handle } = await import ( this . #modules. get ( importPath ) ! . jsFile )
162
+ const { default : handle } = await import ( "file://" + this . #modules. get ( importPath ) ! . jsFile )
163
163
return handle
164
164
}
165
165
}
@@ -212,7 +212,7 @@ export default class Project {
212
212
async getData ( ) {
213
213
const mod = this . #modules. get ( './data.js' ) || this . #modules. get ( './data/index.js' )
214
214
if ( mod ) {
215
- const { default : Data } = await import ( mod . jsFile )
215
+ const { default : Data } = await import ( "file://" + "file://" + mod . jsFile )
216
216
let data : any = Data
217
217
if ( util . isFunction ( Data ) ) {
218
218
data = await Data ( )
@@ -325,7 +325,7 @@ export default class Project {
325
325
log . fatal ( 'parse config.json:' , e . message )
326
326
}
327
327
} else {
328
- const { default : conf } = await import ( p )
328
+ const { default : conf } = await import ( "file://" + p )
329
329
if ( util . isPlainObject ( conf ) ) {
330
330
Object . assign ( config , conf )
331
331
log . debug ( name , config )
@@ -1041,9 +1041,9 @@ export default class Project {
1041
1041
{ default : App } ,
1042
1042
{ default : Page }
1043
1043
] = await Promise . all ( [
1044
- import ( this . #modules. get ( '//deno.land/x/aleph/renderer.js' ) ! . jsFile ) ,
1045
- appModule ? await import ( appModule . jsFile ) : Promise . resolve ( { } ) ,
1046
- await import ( pageModule . jsFile )
1044
+ import ( "file://" + this . #modules. get ( '//deno.land/x/aleph/renderer.js' ) ! . jsFile ) ,
1045
+ appModule ? await import ( "file://" + appModule . jsFile ) : Promise . resolve ( { } ) ,
1046
+ await import ( "file://" + pageModule . jsFile )
1047
1047
] )
1048
1048
const data = await this . getData ( )
1049
1049
const html = renderPage ( data , url , appModule ? App : undefined , Page )
0 commit comments