diff --git a/package.json b/package.json index 030c396..bddaa30 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coconfig", - "version": "1.4.0", + "version": "1.4.1", "description": "Centralize your per-package rc, dotfile and config files into one extensible config file", "main": "build/index.js", "types": "build/index.d.ts", diff --git a/src/passthrough.ts b/src/passthrough.ts index 606c380..e745f98 100644 --- a/src/passthrough.ts +++ b/src/passthrough.ts @@ -46,7 +46,7 @@ const { configuration } = configItem && configItem['${key}']; const resolved = typeof configuration === 'function' ? configuration() : configuration; `; - if (isModule && isTs) { + if (isTs) { return `${header} import cjs from '${modulePath}'; import * as esmToCjs from '${modulePath}'; @@ -71,13 +71,6 @@ export default resolved;\n`; const isCoconfigTs = /.[cm]?ts/.test(path.extname(env.coconfigPath)); - if (isCoconfigTs && isTs) { - return `${header} -const configModule = require('${modulePath}'); -${commonCode} -module.exports = resolved;\n`; - } - if (isCoconfigTs) { // Target is JS, source is typescript (requires ts-node) return `${header}