Skip to content

DevSA-009/babel-plugin-tsconfig-alias-to-relative

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

babel-plugin-tsconfig-alias-to-relative

Overview

npm version npm version

This Babel plugin is designed to automatically resolve TypeScript's tsconfig.json path aliases using relative paths. It simplifies the development process by allowing you to use aliases in your import statements without worrying about the file's location.

dependency weekly downloads
json-to-js-obj npm version

Installation

To install the babel-plugin-tsconfig-alias-to-relative, use your preferred package manager:

npm install -D babel-plugin-tsconfig-alias-to-relative

Or

yarn add babel-plugin-tsconfig-alias-to-relative --dev

Note:

This plugin just only resolve src directory files only. I mean you needed to use conventional rules.

Features

  • Dynamically resolve path to relative path style.

Usage

you must to be specified in babel config file

{
  "presets": [
    // ...
    "@babel/preset-typescript",
    // ...
  ],
  "plugins": [
    // add this to your babel config file in `plugins`
    // 👇👇👇
    "tsconfig-alias-to-relative"
    // 👆👆👆
    // ...
  ]
}

Contact

If you have any questions, feedback, or need assistance with this package, feel free to reach out:

About

Path resolve (relative) plugin for babel

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published