File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -669,7 +669,7 @@ export default class OfflinePlugin {
669669 relativeBase = relativeBase + '/' ;
670670 }
671671
672- tool . basePath = relativeBase [ 0 ] === '.' ? relativeBase : './' + relativeBase ;
672+ tool . basePath = relativeBase [ 0 ] === '.' ? relativeBase : path . resolve ( './' , relativeBase ) ;
673673 } else if ( this . publicPath ) {
674674 tool . basePath = this . publicPath . replace ( / \/ $ / , '' ) + '/' ;
675675 }
@@ -698,7 +698,7 @@ export default class OfflinePlugin {
698698 return _path ;
699699 }
700700
701- return tool . basePath + _path ;
701+ return path . resolve ( tool . basePath , _path ) ;
702702 } ) ;
703703 } else {
704704 tool . pathRewrite = ( path => {
@@ -726,7 +726,7 @@ export default class OfflinePlugin {
726726 return key ;
727727 }
728728
729- return this . publicPath + key . replace ( / ^ \. ? \/ / , '' ) ;
729+ return path . resolve ( this . publicPath , key . replace ( / ^ \. ? \/ / , '' ) ) ;
730730 } ) ;
731731 }
732732
You can’t perform that action at this time.
0 commit comments