@baseplate-dev/core-generators
Version:
Core generators for Baseplate
11 lines • 427 B
JavaScript
/**
* Normalizes a TypeScript file path to a JavaScript file path useful
* for converting source file paths to Node.js compatible paths.
*
* @param filePath - The file path to normalize with a *.ts or *.tsx extension.
* @returns The normalized file path with a *.js extension.
*/
export function normalizeTsPathToJsPath(filePath) {
return filePath.replace(/\.(t|j)sx?$/, '.js');
}
//# sourceMappingURL=ts-paths.js.map