File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ const Manifest = (): Plugin[] => {
28
28
let remoteEntryFile : string ;
29
29
let publicPath : string ;
30
30
let _command : string ;
31
+ let _originalConfigBase : string | undefined ;
31
32
let viteConfig : any ;
32
33
return [
33
34
{
@@ -85,6 +86,7 @@ const Manifest = (): Plugin[] => {
85
86
if ( ! config . build . manifest )
86
87
config . build . manifest = config . build . manifest || ! ! manifestOptions ;
87
88
_command = command ;
89
+ _originalConfigBase = config . base ;
88
90
} ,
89
91
configResolved ( config ) {
90
92
root = config . root ;
@@ -101,7 +103,8 @@ const Manifest = (): Plugin[] => {
101
103
if ( _command === 'serve' ) {
102
104
base = ( config . server . origin || '' ) + config . base ;
103
105
}
104
- publicPath = base ? base . replace ( / \/ ? $ / , '/' ) : 'auto' ;
106
+ publicPath =
107
+ _originalConfigBase === '' ? 'auto' : base ? base . replace ( / \/ ? $ / , '/' ) : 'auto' ;
105
108
} ,
106
109
async generateBundle ( options , bundle ) {
107
110
if ( ! mfManifestName ) return ;
You can’t perform that action at this time.
0 commit comments