We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86171ec commit c3fbbefCopy full SHA for c3fbbef
packages/server/src/util.js
@@ -17,7 +17,10 @@ export const smartRequire = modulePath => {
17
return eval('module.require')(modulePath)
18
}
19
20
-export const joinURLPath = (...paths) => {
21
- const cleanPaths = paths.map(path => path.replace(/\/$/, ''))
22
- return cleanPaths.join('/')
+export const joinURLPath = (publicPath, filename) => {
+ if (publicPath.substr(-1) === '/') {
+ return `${publicPath}${filename}`
23
+ }
24
+
25
+ return `${publicPath}/${filename}`
26
0 commit comments