Skip to content

Commit 1c789fb

Browse files
authored
fix(loader): fix publicPath regression
... when the publicPath is set to an empty string. The publicPath should resolve to an empty string in this case and _not_ `/`
1 parent b0a0355 commit 1c789fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/loader.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export function pitch(request) {
6868
const childFilename = '*'; // eslint-disable-line no-path-concat
6969
const publicPath =
7070
typeof options.publicPath === 'string'
71-
? options.publicPath.endsWith('/')
71+
? options.publicPath === '' || options.publicPath.endsWith('/')
7272
? options.publicPath
7373
: `${options.publicPath}/`
7474
: typeof options.publicPath === 'function'

0 commit comments

Comments
 (0)