0.0.2 • Published 4 years ago

@nick-bull/module-alias v0.0.2

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

Allows for importing modules with an alias. Shamelessly forked from module-alias

Installation

npm i @nick-bull/module-alias

Usage

Specify your module aliases in package.json:

  "moduleAliases": {
    "#app": "./src",
    "#services": "./src/services",
    "#utils": "./src/utils"
  },

Then register as soon as possible:

import '@nick-bull/module-alias/register';

- import awesomeService from '../../../src/services/awesomeService';
+ import awesomeService from '#services/awesomeService';

Automate alias conversion

Check this out!

0.0.2

4 years ago

0.0.1

4 years ago