ts-module-alias

npm install ts-module-alias

Usage no npm install needed!

<script type="module">
  import tsModuleAlias from 'https://cdn.skypack.dev/ts-module-alias';
</script>

README

README

Installation

npm install ts-module-alias

Usage with JEST

You simply have to dynamically change your Jest config using:

// jest.config.js
const { getModuleNameMapper } = require('ts-module-alias');
const moduleNameMapper = getModuleNameMapper();
module.exports = { moduleNameMapper };

Manual usage

import { register } from 'ts-module-alias';

register({ verbose: true });

Automatic usage

import 'ts-modules-alias/dist/auto';