diff --git a/.eslintignore b/.eslintignore index 30f4cfd..6084a56 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,2 +1,5 @@ dist test/fixtures/error-* +renovate.json +package.json +tsconfig.json diff --git a/README.md b/README.md index 1e8c1e8..1c41191 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ Enable debug to see which files are transpiled - Type: Boolean | String - Default: `true` -- Environment Vriable: `JITI_CACHE` +- Environment Variable: `JITI_CACHE` Use transpile cache @@ -76,7 +76,7 @@ If set to `true` will use `node_modules/.cache/jiti` (if exists) or `{TMP_DIR}/n - Type: Boolean | String - Default: `false` -- Environment Vriable: `JITI_ESM_RESOLVE` +- Environment Variable: `JITI_ESM_RESOLVE` Using esm resolution algorithm to support `import` condition. @@ -91,7 +91,7 @@ Transform function. See [src/babel](./src/babel.ts) for more details - Type: Boolean - Default `false` -- Environment Vriable: `JITI_SOURCE_MAPS` +- Environment Variable: `JITI_SOURCE_MAPS` Add inline source map to transformed source for better debugging. diff --git a/src/jiti.ts b/src/jiti.ts index 067291c..48e5f86 100644 --- a/src/jiti.ts +++ b/src/jiti.ts @@ -16,7 +16,7 @@ import { TransformOptions, JITIOptions } from './types' const _EnvDebug = destr(process.env.JITI_DEBUG) const _EnvCache = destr(process.env.JITI_CACHE) -const _EnvESMReolve = destr(process.env.JITI_ESM_RESOLVE) +const _EnvESMResolve = destr(process.env.JITI_ESM_RESOLVE) const _EnvRequireCache = destr(process.env.JITI_REQUIRE_CACHE) const _EnvSourceMaps = destr(process.env.JITI_SOURCE_MAPS) @@ -28,7 +28,7 @@ const defaults: JITIOptions = { requireCache: _EnvRequireCache !== undefined ? !!_EnvRequireCache : true, sourceMaps: _EnvSourceMaps !== undefined ? !!_EnvSourceMaps : false, interopDefault: false, - esmResolve: _EnvESMReolve || false, + esmResolve: _EnvESMResolve || false, cacheVersion: '6', legacy: lt(process.version || '0.0.0', '14.0.0'), extensions: ['.js', '.mjs', '.cjs', '.ts']