@@ -211,6 +211,7 @@ export const baseConfig = async ({
211211 let rawVitrifyConfig : VitrifyConfig | VitrifyConfigAsync
212212 let vitrifyConfig : VitrifyConfig
213213
214+ console . log ( appDir )
214215 try {
215216 if ( fs . existsSync ( fileURLToPath ( new URL ( 'vitrify.config.ts' , appDir ) ) ) ) {
216217 const configPath = fileURLToPath ( new URL ( 'vitrify.config.ts' , appDir ) )
@@ -219,11 +220,13 @@ export const baseConfig = async ({
219220 )
220221 fs . writeFileSync ( configPath + '.js' , bundledConfig . code )
221222
223+ console . log ( 'kljsdflkjdsf' )
224+ console . log ( configPath )
222225 rawVitrifyConfig = ( await import ( 'file://' + configPath + '.js' ) ) . default
223226 fs . unlinkSync ( configPath + '.js' )
224227 } else {
225228 rawVitrifyConfig = (
226- await import ( fileURLToPath ( new URL ( 'vitrify.config.js' , appDir ) ) )
229+ await import ( new URL ( 'vitrify.config.js' , appDir ) . href )
227230 ) . default
228231 }
229232 if ( typeof rawVitrifyConfig === 'function' ) {
@@ -427,7 +430,7 @@ export const baseConfig = async ({
427430 . replaceAll ( '+' , '' )
428431
429432 return `import ${ varName } from '${
430- new URL ( url , appDir ) . pathname
433+ new URL ( url , appDir ) . href
431434 } '; onAppMounted.push(${ varName } );`
432435 } )
433436 . join ( '\n' ) }
@@ -446,7 +449,7 @@ export const baseConfig = async ({
446449 . replaceAll ( '+' , '' )
447450
448451 return `import ${ varName } from '${
449- new URL ( url , appDir ) . pathname
452+ new URL ( url , appDir ) . href
450453 } '; onAppRendered.push(${ varName } );`
451454 } )
452455 . join ( '\n' ) }
@@ -465,7 +468,7 @@ export const baseConfig = async ({
465468 . replaceAll ( '+' , '' )
466469
467470 return `import ${ varName } from '${
468- new URL ( url , appDir ) . pathname
471+ new URL ( url , appDir ) . href
469472 } '; onTemplateRendered.push(${ varName } );`
470473 } )
471474 . join ( '\n' ) }
@@ -484,7 +487,7 @@ export const baseConfig = async ({
484487 . replaceAll ( '+' , '' )
485488
486489 return `import ${ varName } from '${
487- new URL ( url , appDir ) . pathname
490+ new URL ( url , appDir ) . href
488491 } '; onAppCreated.push(${ varName } );`
489492 } )
490493 . join ( '\n' ) }
@@ -501,7 +504,7 @@ export const baseConfig = async ({
501504 . replaceAll ( '+' , '' )
502505
503506 return `import ${ varName } from '${
504- new URL ( url , appDir ) . pathname
507+ new URL ( url , appDir ) . href
505508 } '; onSetup.push(${ varName } );`
506509 } )
507510 . join ( '\n' ) } `
@@ -601,14 +604,7 @@ export const baseConfig = async ({
601604 entry = fileURLToPath ( new URL ( 'csr/entry.ts' , frameworkDir ) )
602605 }
603606 let entryScript
604- if ( process . platform === 'win32' ) {
605- const split = entry . split ( 'node_modules' )
606- entryScript = `<script type="module" src="node_modules${ split . at (
607- - 1
608- ) } "></script>`
609- } else {
610- entryScript = `<script type="module" src="${ entry } "></script>`
611- }
607+ entryScript = `<script type="module" src="${ entry } "></script>`
612608 html = appendToBody ( entryScript , html )
613609 if ( productName ) html = addOrReplaceTitle ( productName , html )
614610 return html
@@ -793,7 +789,7 @@ export const baseConfig = async ({
793789 // environments: {
794790 // },
795791 server : {
796- https : vitrifyConfig . server ?. https ,
792+ // https: vitrifyConfig.server?.https,
797793 // middlewareMode: mode === 'ssr' ? 'ssr' : undefined,
798794 middlewareMode : ssr ? true : false ,
799795 fs : {
0 commit comments