# What changed in jiti

> 24 changes in jiti 2 from its official release notes, upgrade guides and advisories: 3 breaking, 13 new APIs and options. Each one cited. Sources checked 2026-10-23. HTML: https://unstale.sh/npm/jiti/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## jiti 2

### Breaking changes

- Use the named export instead of the default export when importing `createJiti`. (2.0.0) — [release notes](https://github.com/unjs/jiti/releases/tag/v2.0.0)
- Resolves modules with ESM resolution; it accepts try and other resolve options and is consistent with `import.meta.resolve`. (2.0.0) — [release notes](https://github.com/unjs/jiti/releases/tag/v2.0.0)
- Imports modules through the native ESM path, supporting top-level await and native importing of ES-only modules. (2.0.0) — [release notes](https://github.com/unjs/jiti/releases/tag/v2.0.0)

### New APIs and options

- Adds support for using and await using. (2.7.0) — [release notes](https://github.com/unjs/jiti/releases/tag/v2.7.0)
- Adds the jiti/static subpath. (2.7.0) — [release notes](https://github.com/unjs/jiti/releases/tag/v2.7.0)
- Adds opt-in support for tsconfigPaths. (2.7.0) — [release notes](https://github.com/unjs/jiti/releases/tag/v2.7.0)
- Adds support for virtual modules. (2.7.0) — [release notes](https://github.com/unjs/jiti/releases/tag/v2.7.0)
- Enables inspection of jiti internals; the output is more readable and uses colors to help find slow imports. (2.0.0) — [release notes](https://github.com/unjs/jiti/releases/tag/v2.0.0)
- ESM modules can be evaluated with a fallback loader. (2.0.0) — [release notes](https://github.com/unjs/jiti/releases/tag/v2.0.0)
- Support was added for `import.meta.resolve`. (2.0.0) — [release notes](https://github.com/unjs/jiti/releases/tag/v2.0.0)
- Enables debug output with `JITI_DEBUG=1`. (2.0.0) — [release notes](https://github.com/unjs/jiti/releases/tag/v2.0.0)
- Configures `interopDefault` through an environment variable. (2.0.0) — [release notes](https://github.com/unjs/jiti/releases/tag/v2.0.0)
- Provides the jiti API while depending only on runtime `import.meta.resolve` and dynamic `import()` support. (2.0.0) — [release notes](https://github.com/unjs/jiti/releases/tag/v2.0.0)
- Registers jiti globally using experimental Node.js global hooks, either with `node --import` or a programmatic import. (2.0.0) — [release notes](https://github.com/unjs/jiti/releases/tag/v2.0.0)
- Enables direct importing of `.jsx` and `.tsx` files when set to true; JSX support is opt-in. (2.0.0) — [release notes](https://github.com/unjs/jiti/releases/tag/v2.0.0)
- Supported through native ESM importing. (2.0.0) — [release notes](https://github.com/unjs/jiti/releases/tag/v2.0.0)

### Performance

- Caching reduces proxy overhead by about 2x. (2.7.0) — [release notes](https://github.com/unjs/jiti/releases/tag/v2.7.0)
- Overhead of jiti sub-instances was reduced. (2.0.0) — [release notes](https://github.com/unjs/jiti/releases/tag/v2.0.0)

### Behavior and default changes

- jiti handles `data:` imports. (2.0.0) — [release notes](https://github.com/unjs/jiti/releases/tag/v2.0.0)
- The package exports are available in both ESM and CJS formats for importing jiti in ESM contexts. (2.0.0) — [release notes](https://github.com/unjs/jiti/releases/tag/v2.0.0)
- When `node_modules` exists, jiti stores caches there instead of using a temp directory, making them easier to inspect locally. (2.0.0) — [release notes](https://github.com/unjs/jiti/releases/tag/v2.0.0)

### Fixes and other changes

- Adds a fallback for ENAMETOOLONG when evaluating ESM. (2.7.0) — [release notes](https://github.com/unjs/jiti/releases/tag/v2.7.0)
- Passes resolve options through require. (2.7.0) — [release notes](https://github.com/unjs/jiti/releases/tag/v2.7.0)
- Falls back to transpilation when tryNative fails. (2.7.0) — [release notes](https://github.com/unjs/jiti/releases/tag/v2.7.0)
