UNPKG

tsconfig.js

Version:

Polyfill for tsconfig.js, because TypeScript does not natively support JS config files

11 lines (9 loc) 233 B
const path = require('path') module.exports = function resolvePath (filepath) { try { // add file extension return require.resolve(filepath) // throws if not found, hence try } catch (e) { return path.resolve(filepath) } }