Commit 52ebed8 1 parent c54614a commit 52ebed8 Copy full SHA for 52ebed8
File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,10 @@ class Html {
25
25
path = path . replace ( / ^ \/ / , '' ) ;
26
26
path = path . replace ( / \/ $ / , '' ) ;
27
27
28
- if ( this . config . exportStatic ?. htmlSuffix || path === 'index.html' ) {
28
+ if (
29
+ ( this . config . exportStatic && this . config . exportStatic . htmlSuffix ) ||
30
+ path === 'index.html'
31
+ ) {
29
32
return `${ path } ` ;
30
33
} else {
31
34
return `${ path } /index.html` ;
@@ -36,8 +39,11 @@ class Html {
36
39
const htmlPath = this . getHtmlPath ( path ) ;
37
40
const len = htmlPath . split ( '/' ) . length ;
38
41
return (
39
- Array ( this . config . exportStatic ?. htmlSuffix ? len : len - 1 ) . join ( '../' ) ||
40
- './'
42
+ Array (
43
+ this . config . exportStatic && this . config . exportStatic . htmlSuffix
44
+ ? len
45
+ : len - 1 ,
46
+ ) . join ( '../' ) || './'
41
47
) ;
42
48
}
43
49
@@ -46,7 +52,7 @@ class Html {
46
52
return opts . file ;
47
53
}
48
54
const file = opts . file . charAt ( 0 ) === '/' ? opts . file . slice ( 1 ) : opts . file ;
49
- if ( this . config . exportStatic ? .dynamicRoot ) {
55
+ if ( this . config . exportStatic && this . config . exportStatic . dynamicRoot ) {
50
56
return `${ this . getRelPathToPublicPath ( opts . path || '/' ) } ${ file } ` ;
51
57
} else {
52
58
return `${ this . config . publicPath } ${ file } ` ;
You can’t perform that action at this time.
0 commit comments