Skip to content

Alias Imports

Compare
Choose a tag to compare
@ctsstc ctsstc released this 26 Apr 13:49
· 35 commits to master since this release
cca963a

The main goal was to reduce ugly imports ../../lib/something. I kept some relative imports that were in the same directory, but removed all imports that traversed up folders to use the new absolute alias imports instead.

Changes

  • Import using absolute path aliases
  • You can now use @ to reference the /src directory
  • Added @root but should this even really exist ¯\_(ツ)_/¯
    • This is used to fetch the version
  • Instead of nasty relative imports now you can use @ as an alias to the src directory
  • Tests will use the alias
  • Node TS will compile and run using aliases as well
  • VSCode IDE recognizes the pathing based off of the tsconfig 🎉

Fixes

PRs

  • 120