Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(readme): update typescript env variable section #328

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,13 @@ Autoload can be customised using the following options:
// { country: 'be', language: 'nl' }
```

## Override Typescript detection per Environment variable
## Override TypeScript detection using an environment variable

It is possible to override the automatic detection of a typescript capable runtime per `FASTIFY_AUTOLOAD_TYPESCRIPT` environment variable. If set to a truthy value Autoload will load `.ts` files, expecting that node has a typescript capable loader.
It is possible to override the automatic detection of a Typescript-capable runtime using the `FASTIFY_AUTOLOAD_TYPESCRIPT` environment variable. If set to a truthy value Autoload will load `.ts` files, expecting that node has a TypeScript-capable loader.

This is useful for cases, where you want to use Autoload for loading typescript files but detecting the typescript loader fails, because for example you are using a custom loader.
This is useful for cases where you want to use Autoload for loading typescript files but detecting the typescript loader fails because, for example, you are using a custom loader.

You can use it like this:
It can be used like this:

```sh
FASTIFY_AUTOLOAD_TYPESCRIPT=1 node --loader=my-custom-loader index.ts
Expand Down
Loading