@open-wc/building-utils
Version:
Utils for @open-wc packages that do build stuff
14 lines (10 loc) • 300 B
JavaScript
const path = require('path');
const toBrowserPathRegExp = new RegExp(path.sep === '\\' ? '\\\\' : path.sep, 'g');
/**
* @param {string} filePath
* @returns {string}
*/
function toBrowserPath(filePath) {
return filePath.replace(toBrowserPathRegExp, '/');
}
module.exports = { toBrowserPath };