es-dev-server-rollup
Version:
Use rollup plugins in es-dev-server
17 lines (16 loc) • 619 B
JavaScript
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.toBrowserPath = void 0;
const path_1 = __importDefault(require("path"));
/**
* Turns a file path into a path suitable for browsers, with a / as seperator.
* @param {string} filePath
* @returns {string}
*/
function toBrowserPath(filePath) {
return filePath.replace(new RegExp(path_1.default.sep === '\\' ? '\\\\' : path_1.default.sep, 'g'), '/');
}
exports.toBrowserPath = toBrowserPath;
;