Version: 2.0.0 (latest)
Root Imports
You are reading the documentation for version 2 of FoalTS. Instructions for upgrading to this version are available here. The old documentation can be found here.
FoalTS build does not resolve root imports by default. You must install the module-alias package if you want to use them. Here's how to configure the library with Foal:
Specify the directory from which root imports should be resolved during compilation.
tsconfig.json
Specify the directory from which root imports should be resolved at runtime.
package.json
Then register the loader at the top of the file src/index.ts
.
src/index.ts
If you use shell scripts, the loader must also be registered at the top of each one.
src/scripts/create-user.ts (example)