@@ -223,7 +223,7 @@ class Renderer {
223
223
memoryParsed = path . parse ( filePath . split ( this . pagesPath ) [ 1 ] ) ;
224
224
}
225
225
226
- const memoryBase = path . join ( path . sep === '/' ? '/' : 'C:\\' , ` ${ this . baseUrl } /expressvue/bundles` , memoryParsed . dir ) ;
226
+ const memoryBase = path . resolve ( path . join ( `/ ${ this . baseUrl } ` , ' /expressvue/bundles' , memoryParsed . dir ) ) ; // add C: for memory file system for windows machines
227
227
const memoryPath = path . join ( memoryBase , memoryParsed . name ) ;
228
228
229
229
return {
@@ -359,7 +359,7 @@ class Renderer {
359
359
//Check if the bundle exists if not make a new one
360
360
try {
361
361
const bundlePath = this . getBundleFilePath ( filePath ) ;
362
- context . script = bundlePath . memory . filename . client ;
362
+ context . script = path . join ( '/' , path . relative ( path . resolve ( '/' ) , bundlePath . memory . filename . client ) ) ; // strip drive letter for windows systems
363
363
const layout = buildLayoutWebpack ( context ) ;
364
364
365
365
const clientBundle = this . mfs . readFileSync ( bundlePath . memory . filename . client , "utf-8" ) ;
@@ -382,7 +382,7 @@ class Renderer {
382
382
//Make Bundle
383
383
const webpackConfig = await this . _buildConfig ( filePath ) ;
384
384
const bundle = await this . _makeBundle ( webpackConfig , filePath ) ;
385
- context . script = bundle . clientBundlePath ;
385
+ context . script = path . join ( '/' , path . relative ( path . resolve ( '/' ) , bundle . clientBundlePath ) ) ; // strip drive letter for windows systems
386
386
const layout = buildLayoutWebpack ( context ) ;
387
387
388
388
const rendererOptions = {
@@ -487,10 +487,11 @@ class Renderer {
487
487
* @returns {string } bundle
488
488
*/
489
489
getBundleFile ( bundleFileName ) {
490
- if ( bundleFileName . endsWith ( "server.bundle.js" ) ) {
490
+ const fullFileName = path . resolve ( bundleFileName ) ; // add C: for memory file system for windows machines
491
+ if ( fullFileName . endsWith ( "server.bundle.js" ) ) {
491
492
return "" ;
492
493
} else {
493
- return this . mfs . readFileSync ( bundleFileName , "utf-8" ) ;
494
+ return this . mfs . readFileSync ( fullFileName , "utf-8" ) ;
494
495
}
495
496
}
496
497
}
0 commit comments