UNPKG

@edx/new-relic-source-map-webpack-plugin

Version:
8 lines (6 loc) 296 B
'use strict'; const removeLastCharIfSlash = s => (s ? s.replace(/\/$/, '') : ''); module.exports = (url, publicPath, file) => { const parsedPublicPath = publicPath === 'auto' ? '' : publicPath; return `${removeLastCharIfSlash(url)}${removeLastCharIfSlash(parsedPublicPath)}/${file}`; };