0.0.7 • Published 2 years ago

load-ts-paths v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

load-ts-paths

Read the paths information defined in tsconfig.json and make it usable in babel-plugin-module-resolver.

install

yarn add -D babel-plugin-module-resolver load-ts-paths

usage

babel.config.js

const {loadTsPaths} = require('load-ts-paths')

module.exports = {
  presets: [...],
  plugins: [
    [
      'babel-plugin-module-resolver',
      {
        root: ['./src'],  // baseUrl of tsconfig.json
        alias: loadTsPaths('./tsconfig.json'),
        extensions: ['.js', '.jsx', '.ts', '.tsx'],
      },
    ],
  ],
}
0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago