File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -99,15 +99,19 @@ export function prodExposePlugin(
99
99
leading: (path) => (path.startsWith('/') ? path.slice(1) : path)
100
100
}
101
101
const isAbsoluteUrl = (url) => url.startsWith('http') || url.startsWith('//');
102
-
102
+
103
103
const cleanBaseUrl = trimmer.trailing(baseUrl);
104
104
const cleanCssPath = trimmer.leading(cssPath);
105
105
const cleanCurUrl = trimmer.trailing(curUrl);
106
-
106
+
107
107
if (isAbsoluteUrl(baseUrl)) {
108
108
href = [cleanBaseUrl, cleanCssPath].filter(Boolean).join('/');
109
109
} else {
110
- href = [cleanCurUrl + cleanBaseUrl, cleanCssPath].filter(Boolean).join('/');
110
+ if (cleanCurUrl.includes(cleanBaseUrl)) {
111
+ href = [cleanCurUrl, cleanCssPath].filter(Boolean).join('/');
112
+ } else {
113
+ href = [cleanCurUrl + cleanBaseUrl, cleanCssPath].filter(Boolean).join('/');
114
+ }
111
115
}
112
116
} else {
113
117
href = cssPath;
You can’t perform that action at this time.
0 commit comments