UNPKG

@open-wc/building-utils

Version:
14 lines (10 loc) 300 B
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 };