@open-wc/building-utils
Version:
Utils for @open-wc packages that do build stuff
12 lines (9 loc) • 298 B
JavaScript
const path = require('path');
/**
* Transforms a file system path to a browser URL. For example windows uses `\` on the file system,
* but it should use `/` in the browser.
*/
function toFilePath(browserPath) {
return browserPath.replace(/\//g, path.sep);
}
module.exports = { toFilePath };