Skip to content

Commit

Permalink
feat(ts-node-dev-support): check if env variable is set (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
hblomqvist committed Sep 1, 2021
1 parent 4a7f923 commit 4d8bbc8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/strategies/LoaderStrategy.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { isNullish } from '@sapphire/utilities';
import { basename, extname } from 'path';
import { pathToFileURL } from 'url';
import { MissingExportsError } from '../errors/MissingExportsError';
Expand Down Expand Up @@ -25,7 +26,7 @@ export class LoaderStrategy<T extends Piece> implements ILoaderStrategy<T> {
* source `.ts` files, rather than files emitted with any of the JavaScript
* extensions.
*/
if (Reflect.has(process, Symbol.for('ts-node.register.instance'))) {
if (Reflect.has(process, Symbol.for('ts-node.register.instance')) || !isNullish(process.env.TS_NODE_DEV)) {
this.supportedExtensions.push('.ts');
}
}
Expand Down

0 comments on commit 4d8bbc8

Please sign in to comment.