File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1418,7 +1418,7 @@ export async function resolveConfig(
14181418 inlineConfig,
14191419 root : resolvedRoot ,
14201420 base,
1421- decodedBase : decodeURI ( base ) ,
1421+ decodedBase : decodeBase ( base ) ,
14221422 rawBase : resolvedBase ,
14231423 publicDir : resolvedPublicDir ,
14241424 cacheDir,
@@ -1678,6 +1678,16 @@ export function resolveBaseUrl(
16781678 return base
16791679}
16801680
1681+ function decodeBase ( base : string ) : string {
1682+ try {
1683+ return decodeURI ( base )
1684+ } catch {
1685+ throw new Error (
1686+ 'The value passed to "base" option was malformed. It should be a valid URL.' ,
1687+ )
1688+ }
1689+ }
1690+
16811691export function sortUserPlugins (
16821692 plugins : ( Plugin | Plugin [ ] ) [ ] | undefined ,
16831693) : [ Plugin [ ] , Plugin [ ] , Plugin [ ] ] {
You can’t perform that action at this time.
0 commit comments